当尝试构建flutter应用程序时,codemagic显示以下错误。
Error output from CocoaPods:
↳
[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Build failed :|
Failed to build for iOS
该应用程序在Android上构建OK
我还注意到以下错误:
[!] CocoaPods could not find compatible versions for pod "firebase_ml_vision":
In Podfile:
firebase_ml_vision (from `.symlinks/plugins/firebase_ml_vision/ios`)
Specs satisfying the `firebase_ml_vision (from `.symlinks/plugins/firebase_ml_vision/ios`)` dependency were found, but they required a higher minimum deployment target.
2条答案
按热度按时间fnatzsnv1#
你需要增加你的
Podfile
中的部署目标,如插件文档中所述0.7.0+版本使用最新的ML Kit for Firebase版本,该版本要求最低部署目标为9.0。您可以在iOS项目Podfile中添加行平台:ios,'9.0'。
导航到
ios/Podfile
(而不是Podfile.lock
),删除#
取消第二行的注解,然后再次尝试构建。vsikbqxv2#
如果您的CodeMagic构建生成了Podfile,您可以尝试更新
ios/Runner.xcodeproj/project.pbxproj
文件。将所有
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
行替换为IPHONEOS_DEPLOYMENT_TARGET = 9.0;
。您可能会看到/需要其他版本号。