4

If I build for Android or web, it works fine. But on iOS, it fails as below.

----------------------
flutter -v doctor
----------------------

[✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-x64, locale ko-KR) • Flutter version 2.8.1 at /Users/hyoungtae/work_flutter/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 77d935af4d (4주 전), 2021-12-16 08:37:33 -0800 • Engine revision 890a5fca2e • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/hyoungtae/Library/Android/sdk • Platform android-31, build-tools 30.0.2 • 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 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 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)


error log

Could not build the application for the simulator. Error launching application on iPhone 13. "flutter run" took 25,444ms.

       #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
       #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:674:9)
       <asynchronous suspension>
       #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1140: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:94:3)
       <asynchronous suspension>
6
  • 1
    there are a lot of packages in your project. which package do you want to run Commented Jan 13, 2022 at 15:24
  • 1
    At times flutter does this problem. It does not run on emulator. But, when you try to run on actual phone, it will work perfectly. Commented Jan 18, 2022 at 20:02
  • 1
    Can it be simply a timeout? 25s is quite a lot of time, I can understand that the IDE would think that something has failed and give a generic error. Commented Jan 19, 2022 at 16:19
  • 3
    Share the rest of the errors please. Full log Commented Jan 22, 2022 at 0:46
  • 1
    please show full log, and plz give a minimal reproducible sample Commented Jan 22, 2022 at 4:04

1 Answer 1

0

Just try to switch channel to master and rerun. I believe it may be a flutter bug but this simple change fixed it for me. In my case even a new app via flutter create would not execute on iOS and would throw many such errors - now it runs on iPhone 13 perfectly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.