ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: dylib (/Users/Shared/store/build/ios/Release-iphoneos/abseil/absl.framework/absl) was built for newer iOS version (11.0) than being linked (10.0)
ld: warning: dylib (/Users/Shared/store/build/ios/Release-iphoneos/gRPC-C++/grpcpp.framework/grpcpp) was built for newer iOS version (11.0) than being linked (10.0)
ld: warning: dylib (/Users/Shared/store/build/ios/Release-iphoneos/leveldb-library/leveldb.framework/leveldb) was built for newer iOS version (11.0) than being linked (10.0)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
[✓] Flutter (Channel stable, 2.0.0, on Mac OS X 10.15.4 19E266
darwin-x64, locale en-IN)
• Flutter version 2.0.0 at /Applications/flutter2.0_midhilaj
• Framework revision 60bd88df91 (4 weeks ago), 2021-03-03 09:13:17 -0800
• Engine revision 40441def69
• Dart version 2.12.0
[!] Android toolchain - develop for Android devices (Android SDK
version 30.0.3)
• Android SDK at /Users/midhilajm/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Users/midhilajm/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_242-release-1644-b3-6915495)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.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 1.8.0_242-release-1644-b3-6915495)
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio 2.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 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.54.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90
! Error: Midhilaj’s iPhone is not connected. Xcode will continue when Midhilaj’s iPhone is connected. (code -13)
! Doctor found issues in 1 category.
Run flutter upgrade to upgrade to most recent version of Flutter. After that, flutter clean and build again. This should solve your problem.
Only thing which solved me this problem is to clear the pub cache by deleting pubspec.lock file and re running flutter run command.
This mainly happens due to the error in the cached plugin files
Related
This is the screenshot of error after running the app
Here is
flutter doctor -v
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-IN)
• Flutter version 3.0.2 at /Users/magespider/Developer/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cd41fdd495 (9 days ago), 2022-06-08 09:52:13 -0700
• Engine revision f15f824b57
• Dart version 2.17.3
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/magespider/Library/Android/sdk
• Platform android-32, build-tools 32.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
• 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.68.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.42.0
[✓] Connected device (2 available)
• macOS (desktop) • macOS • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.115
! Error: Bhavin’s iPod is not connected. Xcode will continue when Bhavin’s iPod is connected. (code -13)
! Error: iPhone is busy: Waiting to connect and unlock the device. Xcode will continue when iPhone is finished. (code -10)
! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)
! Error: Bhavin’s iPhone is not connected. Xcode will continue when Bhavin’s iPhone is connected. (code -13)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Please help to resolve this issue, Thanks in advance
I tried the following solution
Deleted ios folder and then recreated
pod deintegrate, install
delete podfile, podfile.lock the Pods folder, and install the pod again.
tried to change the Other Linker Flag in Runner -> Build settings,
Added arm64 in Excluded Architecture.
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
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!
whenever I'm trying to run flutter using VScode I get this error
** BUILD FAILED **
Xcode's output:
↳
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
Could not build the application for the simulator.
Error launching application on iPhone 12.
but it builds and runs with Xcode successfully.
my flutter doctor
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale
en-SA)
• Flutter version 2.2.3 at /Users/MJ/Development/Tools/flutter
• Framework revision f4abaa0735 (8 days 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 30.0.1)
• Android SDK at /Users/MJ/Library/Android/sdk
• Platform android-30, build-tools 30.0.1
• 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.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 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)
[✓] VS Code (version 1.58.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.24.0
[✓] Connected device (4 available)
• MJs iPhone (mobile) • 00008101-0016114C3E10001E • ios
• iOS 14.6
• iPhone 12 (mobile) • E504D08A-A8D9-443E-AD19-D91C0EBFD823 • ios
• com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
• macOS (desktop) • macos • darwin-x64
• macOS 11.4 20F71 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 91.0.4472.114
• No issues found!
I have tried deleting podfile and podfile.lock, tried flutter clean and flutter build iOS and flutter run all giving me the same error. but when I'm running or building with Xcode it builds fine with no errors.
please help it's been three weeks now reading the whole internet with now luck.
I am trying to run my flutter app on ios simulator which has few plugins such as connectivity, flutter_webview, fluttertoast etc.
When I am trying to run these I am getting following error on all of these plugins.
Undefined symbols for architecture i386:
"_FlutterMethodNotImplemented", referenced from:
-[FluttertoastPlugin handleMethodCall:result:] in FluttertoastPlugin.o
"_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
objc-class-ref in FluttertoastPlugin.o
Things are running smoothly on android.
I have tried
flutter clean
pod install
Still the error persists.
Anyone facing similar error? If anyone has solution to this please help me with this. Thanks
flutter doctor -v output
[✓] Flutter (Channel beta, v0.11.9, on Mac OS X 10.14.1 18B75, locale en-IN)
• Flutter version 0.11.9 at /Users/vipin/Downloads/soft/flutter
• Framework revision d48e6e433c (5 days ago), 2018-11-20 22:05:23 -0500
• Engine revision 5c8147450d
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/vipin/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/vipin/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-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 30.0.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] Connected device (1 available)
• iPhone XR • DAE7804F-C35A-4847-94AF-BC094BE584DC • ios • iOS 12.1 (simulator)
• No issues found!
If you're using app flavors and getting above error, have a look here
This error is related to Undefined symbols for architecture i386
This worked for me - for the target that reports warnings, change the "Valid Architecture" setting to:
$(VALID_ARCHS)
x86_64
P.S In case this doesn't help, go to Build Settings and search for "No Common Blocks" and set it to "No". Build and Run.