无法为模拟器构建应用程序

时间:2021-03-12 11:27:21

标签: ios xcode flutter

我尝试在 IOS 平台上运行 flutter 应用程序,它显示一个错误并且该错误无法修复它。

它工作正常,我尝试添加 firebase,从那时起我收到此错误。

输出:

elamparithibalakrishnan@Elamparithis-MacBook-Pro ios % flutter run
Changing current working directory to: /Users/elamparithibalakrishnan/AndroidStudioProjects/quizi_mobile_app
Multiple devices found:
AOSP on IA Emulator (mobile) • emulator-5554                        • android-x86    • Android 9 (API 28) (emulator)
iPhone 12 Pro Max (mobile)   • 1E0E6387-F349-4ECA-9858-385698232158 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
Chrome (web)                 • chrome                               • web-javascript • Google Chrome 89.0.4389.82
[1]: AOSP on IA Emulator (emulator-5554)
[2]: iPhone 12 Pro Max (1E0E6387-F349-4ECA-9858-385698232158)
[3]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 2
Running "flutter pub get" in quizi_mobile_app...                 1,214ms
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...                                              7.4s
Running Xcode build...                                                  
Xcode build done.                                           71.3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** 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: Constructing build description
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a
    development team in the Runner editor. (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

颤振医生:

elamparithibalakrishnan@Elamparithis-MacBook-Pro ios % flutter doctor -v
[✓] Flutter (Channel master, 2.1.0-11.0.pre.229, on macOS 11.2 20D64 darwin-x64, locale en-GB)
    • Flutter version 2.1.0-11.0.pre.229 at /Users/elamparithibalakrishnan/Desktop/flutter
    • Framework revision d20ec4c7d8 (5 hours ago), 2021-03-11 22:18:51 -0800
    • Engine revision 1b68503bc8
    • Dart version 2.13.0 (build 2.13.0-125.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/elamparithibalakrishnan/Library/Android/sdk
    • Platform android-30, 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 1.8.0_242-release-1644-b3-6915495)
    • 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.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)

[✓] Connected device (3 available)
    • AOSP on IA Emulator (mobile) • emulator-5554                        • android-x86    • Android 9 (API 28) (emulator)
    • iPhone 12 Pro Max (mobile)   • 1E0E6387-F349-4ECA-9858-385698232158 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)                 • chrome                               • web-javascript • Google Chrome 89.0.4389.82

• No issues found!

我无法找到确切的问题。

有人可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:2)

warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a
    development team in the Runner editor. (in target 'Runner' from project 'Runner')

您必须在 xcode worspace 文件中选择一个开发团队 ID,然后重新运行它。