自更新 flutter 后 Flutter 应用程序未启动

Flutter app doesn't start since updating flutter

请帮帮我!该应用程序即将完成,因为我 运行 flutter upgrade 解决了一个错误,我不得不 运行: flutter clean flutter channel master flutter upgrade flutter 运行

现在它不再启动了,出现了以下代码..

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                           42,0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    In file included from /Users/patrickmeyer/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.m:5:
    /Users/patrickmeyer/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    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.3.99. (in target 'share' from project 'Pods')
    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.3.99. (in target 'GoogleDataTransport' from project 'Pods')
    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.3.99. (in target 'shared_preferences' from project 'Pods')
    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.3.99. (in target 'Firebase' from project 'Pods')
    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.3.99. (in target 'GoogleUtilities' from project 'Pods')
    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.3.99. (in target 'GoogleAppMeasurement' from project 'Pods')
    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.3.99. (in target 'firebase_core' from project 'Pods')
    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.3.99. (in target 'FirebaseCore' from project 'Pods')
    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.3.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
    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.3.99. (in target 'firebase_admob' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'nanopb' from project 'Pods')
    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.3.99. (in target 'Flutter' from project 'Pods')

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

Flutter 医生看起来还不错...

[✓] Flutter(频道稳定,1.22.5,在 Mac OS X 10.15.7 19H114 darwin-x64 上, 语言环境 de-DE) • /Users/patrickmeyer/Developer/flutter 的 Flutter 版本 1.22.5 • 框架修订版 7891006299(13 天前),2020-12-10 11:54:40 -0800 • 引擎版本 ae90085a84 • Dart 版本 2.10.4

[✓] Android 工具链 - 为 Android 设备开发(Android SDK 版本 29.0.3) • Android SDK /Users/patrickmeyer/Library/Android/sdk • 平台 android-29,构建工具 29.0.3 • Java 二进制位于:/Applications/Android 工作室。app/Contents/jre/jdk/Contents/Home/bin/java • Java 版本 OpenJDK 运行时环境(构建 1.8.0_242-release-1644-b3-6915495) • 已接受所有 Android 个许可。

[✓] Xcode - 为 iOS 和 macOS 开发 (Xcode 12.3) • Xcode 在 /Applications/Xcode.app/Contents/Developer • Xcode 12.3,内部版本 12C33 • CocoaPods 版本 1.10.0

[✓] Android Studio(4.1 版) • Android 工作室位于 /Applications/Android 工作室。app/Contents • 安装了 Flutter 插件 • Dart 插件版本 201.9306 • Java 版本 OpenJDK 运行时环境(构建 1.8.0_242-release-1644-b3-6915495)

[✓] 已连接设备(可用 1 个) • iPhone 12 Pro Max(手机) • 11ACA273-A0C3-405D-993A-A9AF9057887C • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3(模拟器)

• 未发现问题!

运行 pod update 在你的 pod 文件中