android - 无法为颤振模拟器构建应用程序
问题描述
我已经完成了所有操作并将 pod 文件中的 iOS 版本更改为 10,但仍然出现错误。
base) Gopis-MacBook-Pro:studyhall gopichand$ flutter run
Launching lib/main.dart on iPhone 11 in debug mode...
Running pod install... 8.4s
Running Xcode build...
└─Compiling, linking and signing... 5.0s
Xcode build done. 16.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode 的输出:
↳
/Users/gopichand/Library/Developer/Xcode/DerivedData/Runner-akyazhjaclkrdsdykcdxdgdzdeof/Build/Intermediates
.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-FD4D52F9DFAD0D40F508D02D.sh: line 2:
/Users/gopichand/Desktop/studyhall/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh:
Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
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.0.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.0.99. (in target 'abseil' 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.0.99. (in target 'BoringSSL-GRPC' 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.0.99. (in target 'leveldb-library' 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.0.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.0.99. (in target 'Toast' 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.0.99. (in target 'GTMSessionFetcher' 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.0.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' 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.0.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.0.99. (in target 'fluttertoast' 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.0.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.0.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.0.99. (in target 'FirebaseAuth' 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.0.99. (in target 'gRPC-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.0.99. (in target 'gRPC-C++' 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.0.99. (in target 'FirebaseFirestore' 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.0.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.0.99. (in target 'cloud_firestore' 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.0.99. (in target 'firebase_auth' 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.0.99. (in target 'FirebaseCoreDiagnosticsInterop' 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.0.99. (in target 'FirebaseAuthInterop' 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.0.99. (in target 'Flutter' 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.0.99. (in target 'Firebase' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 11.
解决方案
由于多种原因,可能会发生此错误。
首先,它可能是由于一些本机错误而发生的,可以通过在 Xcode 中使用
⌘ + B
. 如果是这种情况,那么您可以解决错误并尝试在 Xcode 本身中构建应用程序。如果它在构建过程中成功,那么您的应用程序将从模拟器运行。其次,如果尚未完成,请尝试从 Xcode 更改 iOS 版本。
第三,它可能是由于 pod 的一些变化而发生的。要解决此问题,请执行以下步骤:
rm ios/Podfile
flutter pub get
获取包裹。从目录中的 ios 文件夹中删除Pods文件夹。
cd ios
然后pod install
flutter clean
运行项目。(
F5
如果您使用的是 VSCode,请按)
我希望这能解决你的问题。
推荐阅读
- jquery - contenteditable - 使用 jquery 更新 data-* 属性
- mongodb - 无论如何都无法连接到 Mongo Atlas
- java - Stringbuilder 检查字符串但跳过该字符串并返回其他字符串
- android - RecyclerView 在 android espresso 测试中不滚动
- c# - Unity3D:添加 Vector3 会导致错误的值
- android - 使用本地 HTML 在 Android 上加载本地文件 - net::ERR_FILE_NOT_FOUND
- swift - Alamofire 请求是否真的在后台线程中运行?
- digital-signature - 如何在比特币交易中验证数字签名?
- java - 有没有办法让 Gradle 测试结果转到一个 xml 文件?
- javascript - 在 Internet Explorer 开发人员工具中查找 HTTP 请求发起程序行