我是Flutter的新手 我在My Macbook Pro上设置了Flutter。 Xcode 11.3.1(11C505)
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.14.6 18G4032, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.6)
[✓] IntelliJ IDEA Community Edition (version 2018.3.6)
[✓] VS Code (version 1.44.2)
[✓] Connected device (1 available)
• No issues found!
它与Android模拟器配合正常。 但是,它不适用于IOS。
我尝试过“干净”,但没有成功。 似乎Xcode出现错误,但不知道该怎么办。
Launching lib/main.dart on iPhone 11 in debug mode...
Xcode build done. 57.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
While building module 'Flutter' imported from /Users/hb2746ap/AndroidStudioProjects/test_app/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Users/hb2746ap/AndroidStudioProjects/test_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:109:12: error: attributes may not be specified on a category
@interface NSArray<ObjectType> (NSArrayDiffing)
.........
Skipped
.........
~~~~~~~~^
1 error generated.
15 errors generated.
In file included from /Users/hb2746ap/AndroidStudioProjects/test_app/ios/Runner/GeneratedPluginRegistrant.m:5:
/Users/hb2746ap/AndroidStudioProjects/test_app/ios/Runner/GeneratedPluginRegistrant.h:8:9: fatal error: could not build module 'Flutter'
#import <Flutter/Flutter.h>
~~~~~~~^
16 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone 11.
Exited (sigterm)