我正在开发一个颤振应用程序。我最近转移到 macOS,从那时起就无法运行该应用程序。其他应用程序运行良好,因此我认为错误出在该应用程序的代码中。也许由于同样的原因,我无法进行构建。
\n这是输出flutter doctor:
[\xe2\x9c\x93] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.6 19G73, locale en-US)\n \xe2\x80\xa2 Flutter version 1.20.1 at /Users/bhawna/dev/flutter\n \xe2\x80\xa2 Framework revision 2ae34518b8 (4 days ago), 2020-08-05 19:53:19 -0700\n \xe2\x80\xa2 Engine revision c8e3b94853\n \xe2\x80\xa2 Dart version 2.9.0\n\n[\xe2\x9c\x97] Android toolchain - develop for Android devices\n \xe2\x9c\x97 Unable to locate Android SDK.\n Install Android Studio from: https://developer.android.com/studio/index.html\n On first launch it will assist you in installing the Android SDK components.\n (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).\n If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.\n You may also want to add it to your PATH environment variable.\n\n\n \n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 11.6)\n \xe2\x80\xa2 Xcode at /Applications/Xcode.app/Contents/Developer\n \xe2\x80\xa2 Xcode 11.6, Build version 11E708\n \xe2\x80\xa2 CocoaPods version 1.9.3\n\n[!] Android Studio (not installed)\n \xe2\x80\xa2 Android Studio not found; download from https://developer.android.com/studio/index.html\n (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).\n\n[\xe2\x9c\x93] VS Code (version 1.47.3)\n \xe2\x80\xa2 VS Code at /Applications/Visual Studio Code.app/Contents\n \xe2\x80\xa2 Flutter extension version 3.13.2\n\n \n[\xe2\x9c\x93] Connected device (1 available) \n \xe2\x80\xa2 iPhone 8 (mobile) \xe2\x80\xa2 3D03BDE4-F1A6-45AB-B095-01107CDDC2CD \xe2\x80\xa2 ios \xe2\x80\xa2 com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)\nRun Code Online (Sandbox Code Playgroud)\n输出flutter run:
Running "flutter pub get" in delivero... 1.6s\nLaunching lib/main.dart on iPhone 8 in debug mode...\n \nRunning pod install... 38.2s\nRunning Xcode build... \n \nXcode build done. 449.0s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n ** BUILD FAILED **\n\n\nXcode's output:\n\xe2\x86\xb3\n /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inapp_purchase-2.2.0/ios/Classes/FlutterInappPurchasePlugin.\n m:45:52: warning: assigning to 'id<IAPPromotionObserverDelegate>' from incompatible type 'FlutterInappPurchasePlugin *__strong'\n [IAPPromotionObserver sharedObserver].delegate = self;\n ^ ~~~~\n /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inapp_purchase-2.2.0/ios/Classes/FlutterInappPurchasePlugin.\n m:200:79: warning: implicit conversion loses integer precision: 'SKPaymentTransactionState' (aka 'enum\n SKPaymentTransactionState') to 'int' [-Wshorten-64-to-32]\n [NSNumber numberWithInt: item.transactionState], @"transactionStateIOS",\n ~ ^~~~~~~~~~~~~~~~~~~~~\n /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inapp_purchase-2.2.0/ios/Classes/FlutterInappPurchasePlugin.\n m:586:71: warning: implicit conversion loses integer precision: 'SKPaymentTransactionState' (aka 'enum\n SKPaymentTransactionState') to 'int' [-Wshorten-64-to-32]\n [NSNumber numberWithInt: transaction.transactionState], @"transactionStateIOS",\n ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\n 3 warnings generated.\n /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/contacts_service-0.3.10/ios/Classes/ContactsServicePlugin.m:6:4:\n warning: 'SwiftContactsServicePlugin' is only available on iOS 9.0 or newer [-Wunguarded-availability]\n [SwiftContactsServicePlugin registerWithRegistrar:registrar];\n ^~~~~~~~~~~~~~~~~~~~~~~~~~\n In file included from\n /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/contacts_service-0.3.10/ios/Classes/ContactsServicePlugin.m:2:\n /Users/bhawna/delivero/delivero/build/ios/Debug-iphonesimulator/contacts_service/contacts_service.framework/Headers/contacts_serv\n ice-Swift.h:213:12: note: 'SwiftContactsServicePlugin' has been marked as being introduced in iOS 9.0 here, but the deployment\n target is iOS 8.0.0\n @interface SwiftContactsServicePlugin : NSObject <FlutterPlugin>\n ^\n /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/contacts_service-0.3.10/ios/Classes/ContactsServicePlugin.m:6:4:\n note: enclose 'SwiftContactsServicePlugin' in an @available check to silence this warning\n [SwiftContactsServicePlugin registerWithRegistrar:registrar];\n ^~~~~~~~~~~~~~~~~~~~~~~~~~\n 1 warning generated.\n /Users/bhawna/dev/flutter/packages/flutter_tools/bin/xcode_backend.sh: line 13: pushd: /Users/hrvoje/Documents/Delivero\n Files/contactsFeature: No such file or directory\n Command PhaseScriptExecution failed with a nonzero exit code\n note: Using new build system\n note: Building targets in parallel\n note: Planning build\n note: Constructing build description\n\nCould not build the application for the simulator.\nError launching application on iPhone 8.\nRun Code Online (Sandbox Code Playgroud)\n任何帮助都会很棒。谢谢你的时间。
\n小智 13
经过 2 天的努力,简单的命令使我的归档成功:
flutter clean
flutter pub get
flutter pub upgrade
cd iOS
pod install
pod update
Run Code Online (Sandbox Code Playgroud)
问题已经解决了。
您可能不会相信,但就我而言,问题是由用于生成启动器图标的损坏图像引起的。Alpha 通道有些混乱。我修复后,产品可以成功归档。
| 归档时间: |
|
| 查看次数: |
27135 次 |
| 最近记录: |