使用Android Studio在iOS模拟器上运行Flutter Project

时间:2019-11-15 18:25:43

标签: ios android-studio flutter ios-simulator

我将MacOS升级到了Catalina,当我尝试使用Andriod Studio在iOS模拟器中模拟颤动项目时,收到此消息。 顺便说一句,我正在使用测试应用程序,所以没有什么严重或复杂的问题。

以调试模式在iPhone 8上启动lib / main.dart ... 正在运行Xcode构建... Xcode构建完成。 11.5秒 无法构建iOS应用 Xcode构建错误输出: ↳     **建立失败**

Xcode的输出: ↳

 While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_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)
               ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:196:12: error: attributes may not be specified on a category
    @interface NSMutableArray<ObjectType> (NSMutableArrayDiffing)
               ^
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_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:48:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h:8:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:112:12: error: attributes may not be specified on a category
    @interface NSOrderedSet<ObjectType> (NSOrderedSetDiffing)
               ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:187:12: error: attributes may not be specified on a category
    @interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetDiffing)
               ^
    4 errors generated.
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    In file included from <module-includes>:1:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:9: fatal error: could not build module 'Foundation'
    #import <Foundation/Foundation.h>
     ~~~~~~~^
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
    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/QuartzCore.framework/Headers/QuartzCore.h:9:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:10:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h:12:9: fatal error: could not build module 'Foundation'
    #import <Foundation/NSValue.h>
     ~~~~~~~^
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
    While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
    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/OpenGLES.framework/Headers/EAGLDrawable.h:8:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: could not build module 'Foundation'
    #include <Foundation/Foundation.h>
     ~~~~~~~~^
    1 error generated.
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
    While building module 'Metal' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:7:
    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/Metal.framework/Headers/Metal.h:9:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h:8:9: fatal error: could not build module 'Foundation'
    #import <Foundation/Foundation.h>
     ~~~~~~~^
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
    While building module 'Metal' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:7:
    While building module 'IOSurface' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h:15:
    In file included from <module-includes>:3:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h:15:9: fatal error: could not build module 'Foundation'
    #import <Foundation/Foundation.h>
     ~~~~~~~^
    1 error generated.
    2 errors generated.
    4 errors generated.
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:13:
    In file included from <module-includes>:1:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:9:9: fatal error: could not build module 'Foundation'
    #import <Foundation/Foundation.h>
     ~~~~~~~^
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:13:
    While building module 'CoreVideo' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:10:
    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/CoreVideo.framework/Headers/CoreVideo.h:29:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h:462:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBufferIOSurface.h:26:10: fatal error: could not build module 'IOSurface'
    #include <IOSurface/IOSurfaceRef.h>
     ~~~~~~~~^
    1 error generated.
    2 errors generated.
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'FileProvider' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSFileProviderExtension.h:15:
    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/FileProvider.framework/Headers/FileProvider.h:15:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h:8:9: fatal error: could not build module 'Foundation'
    #import <Foundation/Foundation.h>
     ~~~~~~~^
    1 error generated.
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'UIKit' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
    While building module 'UserNotifications' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UNNotificationResponse+UIKitAdditions.h:10:
    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/UserNotifications.framework/Headers/UserNotifications.h:8:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h:8:9: fatal error: could not build module 'Foundation'
    #import <Foundation/Foundation.h>
     ~~~~~~~^
    1 error generated.
    13 errors generated.
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    In file included from <module-includes>:1:
    In file included from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/Flutter.h:54:
    /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:9: fatal error: could not build module 'UIKit'
    #import <UIKit/UIKit.h>
     ~~~~~~~^
    While building module 'Flutter' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:
    While building module 'CoreMedia' imported from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Flutter/Flutter.framework/Headers/FlutterTexture.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/CoreMedia.framework/Headers/CoreMedia.h:15:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h:29:10: fatal error: could not build module 'CoreVideo'
    #include <CoreVideo/CoreVideo.h>
     ~~~~~~~~^
    1 error generated.
    15 errors generated.
    In file included from /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.m:5:
    /Users/amrohandousa/AndroidStudioProjects/testing_app/ios/Runner/GeneratedPluginRegistrant.h:8:9: fatal error: could not build module 'Flutter'
    #import <Flutter/Flutter.h>
     ~~~~~~~^
    16 errors generated.
    note: Using new build system
    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 8.  

0 个答案:

没有答案