简体   繁体   中英

Flutter ios not build in xcode

Android - app run successfully

IOS - Using Real device: android studio app run successfully but not run in Xcode

- Simulator: not working in android studio or Xcode

*** BUILD FAILED **
Could not build the application for the simulator.
Error launching application on iPhone 12.

Mac configuration deatils

Xcode error run into real device

Android studio full error when using simulator

version using in my project:

[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-arm, locale en-IN) • Flutter version 2.5.3 at /Users/sunilpurushotham/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 18116933e7 (7 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 31.0.0) • Android SDK at /Users/sunilpurushotham/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 13.1, Build version 13A1030d • CocoaPods version 1.11.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 • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] Connected device (3 available) • iPhone (mobile) • 00008020-000E0C121A68002E • ios • iOS 15.1 19B74 • iPhone 12 (mobile) • E148689E-2CD6-489C-BB16-36DC8CD56EE0 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.55

Do Following things:

  1. flutter clean
  2. fluter pub get
  3. cd ios
  4. pod install
  5. pod update
  6. now try to launch on real device

before that remove derived data from preferences of xcode .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM