When I click the android studio run button, I get the following error and no matter how many methods I tried, it doesn't work, but when I type the "flutter run" command, it works.
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
Exception: CocoaPods not installed or not in valid state.
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-x64, locale
tr-TR)
• Flutter version 2.8.1 at /Users/aksoyhlc/flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (6 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version
32.1.0-rc1)
• Android SDK at /Users/aksoyhlc/Library/Android/sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
[✓] Connected device (2 available)
• Aksoyhlc iPhone’u (mobile) •----- •
ios • iOS 14.7.1 18G82
• Chrome (web) • chrome •
web-javascript • Google Chrome 97.0.4692.99
I had this issue sometimes, the only way i found was to uninstall cocoapods, reinstall it and relaunch the IDE. Check the steps todo here: https://stackoverflow.com/a/64000509/9043877
Related
I know this problem already exists everywhere, but I tried most of the solutions of this and still none of them work. The log doesn't seem to specify what's the problem, only shows the said PhaseScriptExecution error.
What else can I do to solve this?
Tried running, re-running, deleting pods files, cleaning, rebuilding, etc.
I'm trying to run a flutter app in a physical device.
Also tried running in a clean project, but the same error persists.
XCode 13.4.1
MBPM1
flutter doctor -v :
Flutter (Channel master, 3.4.0-30.0.pre.19, on macOS 12.4 21F79 darwin-arm64, locale en-PT)
• Flutter version 3.4.0-30.0.pre.19 on channel master at /Users/henriqueguima/work/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f2c6033739 (4 months ago), 2022-09-26 03:50:27 -0400
• Engine revision 53a7659ea1
• Dart version 2.19.0 (build 2.19.0-240.0.dev)
• DevTools version 2.17.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/henriqueguima/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13F100
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.74.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Connected device (3 available)
• iPhone (mobile) • 2c12eaae0fc97e504f295ea6cb964ab6904f42cd • ios • iOS 15.7.2 19H218
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.119
! Error: iPhone is busy: Making iPhone ready for development. Xcode will continue when iPhone is finished. (code -10)
[✓] HTTP Host Availability
• All required HTTP hosts are available
XCode log -- https://pastebin.com/r0RLjiAP
EDIT: downgrade didn't work either
I am trying to build release version for ios in flutter project but getting error. i have successfully build for android and is ready to be release in play store but could not build for ios.
<unknown>:0: error: failed to emit precompiled header '-----/Library/Developer/Xcode/DerivedData/Runner-ffcffkmbdhvzbvdreompnmykxuan/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_2UQTBPBSI3S8D-clang_7BTRW3ZHWAY7.pch' for
bridging header '----------/ios/Runner/Runner-Bridging-Header.h'
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
my flutter doctor -v gives
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.2 20D64 darwin-x64, locale en-GB)
• Flutter version 2.5.3 at /Volumes/Macintosh HD - Data/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (10 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/applefriend/Library/Android/sdk
• Platform android-31, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
[✓] Connected device (2 available)
• iPhone 12 Pro Max (mobile) • A54713A9-6BB0-42E6-85C6-7F337B206109 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.110
• No issues found!
So, yesterday I build an app for ios, archive it and upload it to AppStore connect through xcode, everything seemed good but after few moments I received an email from apple saying:
Dear Developer,
We identified one or more issues with a recent delivery for your app, "APP-NAME" 1.0.1 (2). Please correct the following issues, then upload again.
ITMS-90755: Invalid Binary - The following binaries in your app contains prohibited instructions: /Volumes/data01/app_data/awf/SWImportWorker-mr47p00ce-swpr0068.cse.apple.com-300252/ff03-SoftwareImportWorker-MR_.0/NYH74E2GDJSTMWPVXUPB4IZWH4/umuagyjihbsjsrpn/wspvjpsuvltmmknh/Payload/Runner.app/Frameworks/App.framework/App. Remove the instructions from the binaries, rebuild and resubmit.
Best regards,
The App Store Team
I tried again with flutter clean and also increased the IOS deployment target but it didn't help.
My device's Flutter info:
Flutter (Channel stable, 2.5.0, on macOS 11.5.2 20G95 darwin-x64, locale
en-PK)
• Flutter version 2.5.0 at /Users/niteshkongreja/Development/flutter
• Upstream repository https://github.com/niteshcongreja321/flutter.git
• Framework revision 4cc385b4b8 (10 days ago), 2021-09-07 23:01:49 -0700
• Engine revision f0826da7ef
• Dart version 2.14.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/niteshkongreja/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /Users/niteshkongreja/Library/Android/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5.1, Build version 12E507
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.60.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.26.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 11.5.2 20G95 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.82
• No issues found!
All I had to do was revoke my certificate, delete the mobileprovision file, then recreate both.
I also changed over to Air SDK 3.7.0.1530 and included the Default-568h#2x.png for the iphone splash screen, and well... it seems to have worked.
Flutter doctor -v(same result with and without ios simulator running)
flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on Mac OS X 10.14.6 18G103 darwin-x64, locale en-US)
• Flutter version 2.2.3 at /Users/faizan/Developer/flutter
• Framework revision f4abaa0735 (8 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/faizan/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /Users/faizan/Library/Android/sdk
• Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
✗ Xcode 10.1.0 out of date (12.0.1 is recommended).
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] VS Code (version 1.59.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.25.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • Mac OS X 10.14.6 18G103 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159
! Doctor found issues in 2 categories.
No devices in bottom tab of vscode even i started the ios simulator. Same happens with android studio
I tried both 12.0.1 xcode and 10.1 with and without command line tools
Go to your system activity monitor, search for simulator, double click on it, then quit ==> then fore quit.
It should work afterwards. Don't know why it happens, but it's not the first time, happens on and off.
Facing this error on running flutter build ios. Sqflite is not reflected in the GeneratedPluginRestraints file after flutter build.
Tried flutter clean, pod update etc nothing works.
Flutter version - 1.7.8 and cocoapods version - 1.6.1
sqflite version in pubspec.yaml - ^1.6.1 in dependency overrides
flutter doctor -v output -
[✓] Flutter (Channel unknown, v1.7.8, on Mac OS X 10.14.5 18F132, locale en-GB)
• Flutter version 1.7.8 at /Users/oyo/Downloads/flutter
• Framework revision d51fd86cdb (6 months ago), 2019-06-21 22:31:55 -0400
• Engine revision d004bcd4d6
• Dart version 2.4.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/oyo/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/oyo/Library/Android/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b01)
! Some Android licenses not accepted. To resolve this, run: flutter doctor
--android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.6.1
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b01)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 37.0.3
• Dart plugin version 191.7830
[✓] IntelliJ IDEA Community Edition (version 2019.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 37.1.4
• Dart plugin version 192.5728.98
[✓] Connected device (2 available)
• macOS • macOS • darwin-x64 • Mac OS X 10.14.5 18F132
• web • web • web-javascript • Google Chrome 79.0.3945.88
Just run command in your IDE's terminal,
flutter doctor --android-licenses
There are some android SDK licenses are not accepted. So writing above command will ask you with different licenses to accept with y/n options. Accept all of them to continue your work flow.