When I try to run my app from Android Studio, I get this error:
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set
to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'FMDB' from project 'Pods')
[ +375 ms] Could not build the application for the simulator.
[ +2 ms] Error launching application on iPhone 8.
[ +9 ms] "flutter run" took 116,491ms.
[ +4 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
[ +2 ms] Running shutdown hooks
[ +226 ms] Shutdown hooks complete
[ +11 ms] exiting with code 1
iDecode@iDecodes-mac foo %
flutter build ios
:
iDecode@iDecodes-Mac foo % flutter build ios
Building com.example.foo for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: ABCDEFHI9870
Running pod install... 1.6s
Running Xcode build...
└─Compiling, linking and signing... 7.1s
Xcode build done. 12.4s
Built /Users/iDecode/foo/build/ios/iphoneos/Runner.app.
I’m also able to run this app in the same emulator from Xcode.
Here’s my Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, 2.6.0-11.0.pre, on macOS 11.6 20G165 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.49.0)
[✓] Connected device (3 available)
• No issues found!
2
Answers
Uncomment platform in PodFile and keep it as 12.0 or 11.0. Delete PodFile.lock and run pod install. Open wcworkspace in xcode and you will see a warning. Click on the warning and it would show an option to upgrade deployment target version. Click on apply. Close xcode. Now the flutter run for ios emulator from Android studio should work as expected.
Setting
Excluded Architectures
toi386
helped me: