无法构建 iOS 应用程序 Xcode 构建的错误输出:

Sha*_*med 7 xcode flutter flutter-ios

我将我的 flutter 版本升级到

\n
Flutter 1.24.0-10.2.pre \xe2\x80\xa2 channel beta \xe2\x80\xa2 https://github.com/flutter/flutter.git\nFramework \xe2\x80\xa2 revision 022b333a08 (3 days ago) \xe2\x80\xa2 2020-11-18 11:35:09 -0800\nEngine \xe2\x80\xa2 revision 07c1eed46b\nTools \xe2\x80\xa2 Dart 2.12.0 (build 2.12.0-29.10.beta)\n
Run Code Online (Sandbox Code Playgroud)\n

我的项目运行良好,但升级后,我在尝试在模拟器中运行时遇到以下错误!

\n
  Xcode build done.                                           19.8s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h" is a member of multiple groups\n    ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you\n    want a reference to the same file in more than one group, please add another reference to the same path.\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropOverlayView.h" is a member of multiple groups ("TOCropViewController" and\n    "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same\n    file in more than one group, please add another reference to the same path.\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/Models/TOCroppedImageAttributes.h" is a member of multiple groups ("TOCropViewController"\n    and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the\n    same file in more than one group, please add another reference to the same path.\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropScrollView.h" is a member of multiple groups ("TOCropViewController" and\n    "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same\n    file in more than one group, please add another reference to the same path.\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropToolbar.h" is a member of multiple groups ("TOCropViewController" and\n    "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same\n    file in more than one group, please add another reference to the same path.\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropView.h" is a member of multiple groups ("TOCropViewController" and\n    "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same\n    file in more than one group, please add another reference to the same path.\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/TOCropViewController.h" is a member of multiple groups ("TOCropViewController" and\n    "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same\n    file in more than one group, please add another reference to the same path.\n    2020-11-21 15:26:17.268 xcodebuild[20177:312988] warning:  The file reference for "Objective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.h" is a member of multiple groups\n    ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you\n    want a reference to the same file in more than one group, please add another reference to the same path.\n    ** BUILD FAILED **\n\n\nXcode's output:\n\xe2\x86\xb3\n    In file included from /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:9:\n    /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/Firebase/Firebase.h:75:10: warning: "FirebaseAnalytics.framework is not included in your target. Please add `Firebase/Analytics` to your Podfile or\n    add FirebaseAnalytics.framework to your project to ensure Firebase Messaging works as intended." [-W#warnings]\n            #warning "FirebaseAnalytics.framework is not included in your target. Please add \\\n             ^\n    /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:190:43: warning: 'FIRMessagingRemoteMessage' is deprecated: FCM direct channel is\n    deprecated, please use APNs for downstream message handling. [-Wdeprecated-declarations]\n    - (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {\n                                              ^\n    In file included from /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:9:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/Firebase/Firebase.h:72:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FirebaseMessaging.h:17:\n    /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FIRMessaging.h:219:1: note: 'FIRMessagingRemoteMessage' has been explicitly marked deprecated here\n    __deprecated_msg(\n    ^\n    In module 'Foundation' imported from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseCore/FIRApp.h:17:\n    In module 'CoreFoundation' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:\n    In module 'Darwin' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg'\n            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))\n                                                          ^\n    /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:290:24: warning: 'FIRMessagingRemoteMessage' is deprecated: FCM direct channel is\n    deprecated, please use APNs for downstream message handling. [-Wdeprecated-declarations]\n        didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {\n                           ^\n    In file included from /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:9:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/Firebase/Firebase.h:72:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FirebaseMessaging.h:17:\n    /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FIRMessaging.h:219:1: note: 'FIRMessagingRemoteMessage' has been explicitly marked deprecated here\n    __deprecated_msg(\n    ^\n    In module 'Foundation' imported from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseCore/FIRApp.h:17:\n    In module 'CoreFoundation' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:\n    In module 'Darwin' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg'\n            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))\n                                                          ^\n    /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:136:30: warning: 'shouldEstablishDirectChannel' is deprecated: FCM direct channel is\n    deprecated, please use APNs channel for downstream message delivery. [-Wdeprecated-declarations]\n        [FIRMessaging messaging].shouldEstablishDirectChannel = true;\n                                 ^\n    In file included from /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:9:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/Firebase/Firebase.h:72:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FirebaseMessaging.h:17:\n    /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FIRMessaging.h:283:56: note: 'shouldEstablishDirectChannel' has been explicitly marked deprecated here\n    @property(nonatomic) BOOL shouldEstablishDirectChannel DEPRECATED_MSG_ATTRIBUTE(\n                                                           ^\n    In module 'Foundation' imported from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseCore/FIRApp.h:17:\n    In module 'CoreFoundation' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:\n    In module 'Darwin' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/AvailabilityMacros.h:182:64: note: expanded from macro\n    'DEPRECATED_MSG_ATTRIBUTE'\n                #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))\n                                                                   ^\n    /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:191:52: warning: 'appData' is deprecated [-Wdeprecated-declarations]\n      [self didReceiveRemoteNotification:remoteMessage.appData];\n                                                       ^\n    In file included from /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:9:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/Firebase/Firebase.h:72:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FirebaseMessaging.h:17:\n    /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FIRMessaging.h:226:62: note: 'appData' has been explicitly marked deprecated here\n    @property(nonatomic, readonly, strong) NSDictionary *appData DEPRECATED_ATTRIBUTE;\n                                                                 ^\n    In module 'Foundation' imported from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseCore/FIRApp.h:17:\n    In module 'CoreFoundation' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:\n    In module 'Darwin' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/AvailabilityMacros.h:180:60: note: expanded from macro 'DEPRECATED_ATTRIBUTE'\n            #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))\n                                                               ^\n    /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:289:1: warning: implementing deprecated method [-Wdeprecated-implementations]\n    - (void)messaging:(FIRMessaging *)messaging\n    ^\n    In file included from /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:9:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/Firebase/Firebase.h:72:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FirebaseMessaging.h:17:\n    /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FIRMessaging.h:253:1: note: method 'messaging:didReceiveMessage:' declared here\n    - (void)messaging:(FIRMessaging *)messaging\n    ^\n    /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:291:63: warning: 'appData' is deprecated [-Wdeprecated-declarations]\n      [_channel invokeMethod:@"onMessage" arguments:remoteMessage.appData];\n                                                                  ^\n    In file included from /Users/mdzainalabedin/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:9:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/Firebase/Firebase.h:72:\n    In file included from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FirebaseMessaging.h:17:\n    /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseMessaging/FIRMessaging.h:226:62: note: 'appData' has been explicitly marked deprecated here\n    @property(nonatomic, readonly, strong) NSDictionary *appData DEPRECATED_ATTRIBUTE;\n                                                                 ^\n    In module 'Foundation' imported from /Users/mdzainalabedin/padelmatchv2/ios/Pods/Headers/Private/FirebaseCore/FIRApp.h:17:\n    In module 'CoreFoundation' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:\n    In module 'Darwin' imported from\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:\n    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/AvailabilityMacros.h:180:60: note: expanded from macro 'DEPRECATED_ATTRIBUTE'\n            #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))\n                                                               ^\n    7 warnings generated.\n    error: Build input file cannot be found: '/Users/mdzainalabedin/Downloads/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')\n    note: Using new build system\n    note: Building targets in parallel\n    note: Planning build\n    note: Constructing build description\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'GoogleDataTransport' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'Runner' from project 'Runner')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'sqflite' from project 'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'url_launcher' from project 'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'shared_preferences' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'path_provider' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'launch_review' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'image_picker' from project 'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'image_cropper' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'firebase_messaging' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'firebase_core' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'connectivity' from project 'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target\n    'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'FirebaseCore' from project 'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'FirebaseMessaging' from project\n    'Pods')\n    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'Fir

Jha*_*kiz 7

升级到 . 后我也遇到了同样的问题Flutter 1.22.4 stable channel。这样做之后现在效果很好:

  • flutter clean
  • 删除Podfile.lockiOS文件夹中的内容
  • 检查包更新
  • flutter run

如果这些步骤没有帮助;尝试切换到稳定频道:

flutter channel stable
Run Code Online (Sandbox Code Playgroud)

切换后请记住执行上述步骤。