在codemagic上为iOS构建flutter应用程序时出错-自动分配平台`iOS`版本为`8.0`的目标`Runner`

rm5edbpk  于 2023-05-23  发布在  iOS
关注(0)|答案(2)|浏览(226)

当尝试构建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.
fnatzsnv

fnatzsnv1#

你需要增加你的Podfile中的部署目标,如插件文档中所述
0.7.0+版本使用最新的ML Kit for Firebase版本,该版本要求最低部署目标为9.0。您可以在iOS项目Podfile中添加行平台:ios,'9.0'。
导航到ios/Podfile(而不是Podfile.lock),删除#取消第二行的注解,然后再次尝试构建。

vsikbqxv

vsikbqxv2#

如果您的CodeMagic构建生成了Podfile,您可以尝试更新ios/Runner.xcodeproj/project.pbxproj文件。
将所有IPHONEOS_DEPLOYMENT_TARGET = 8.0;行替换为IPHONEOS_DEPLOYMENT_TARGET = 9.0;。您可能会看到/需要其他版本号。

相关问题