【发布时间】:2021-04-02 10:39:08
【问题描述】:
请帮帮我!该应用程序即将完成,因为我确实运行了flutter upgrade来解决我必须运行的错误:flutter clean flutter channel master flutter upgrade flutter run
现在它不再启动,出现以下代码..
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 (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H114 darwin-x64, 语言环境 de-DE) • Flutter 版本 1.22.5,位于 /Users/patrickmeyer/Developer/flutter • 框架修订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 Studio.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 Studio 位于 /Applications/Android Studio.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(模拟器)
• 未发现任何问题!
【问题讨论】:
标签: ios flutter build ios-simulator