【问题标题】:Error while building flutter app for ios on codemagic - Automatically assigning platform `iOS` with version `8.0` on target `Runner`在codemagic上为ios构建flutter应用程序时出错-在目标`Runner`上自动分配版本`8.0`的平台`iOS`
【发布时间】:2020-09-29 19:56:57
【问题描述】:

在尝试构建 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 上构建正常

我还注意到以下错误:

   [!] 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.

【问题讨论】:

    标签: ios flutter codemagic


    【解决方案1】:

    您需要按照插件文档中的说明在 Podfile 中增加部署目标

    版本 0.7.0+ 使用最新的 ML Kit for Firebase 版本,该版本 要求最低部署目标为 9.0。您可以添加该行 平台 :ios, '9.0' 在你的 iOS 项目 Podfile 中。

    导航到ios/Podfile(不是Podfile.lock)并通过删除#取消注释第二行,然后再次尝试构建。

    【讨论】:

    • 10x,但是我没有ios/Podfile,你能解释一下如何生成一个吗?
    • 在你的项目根目录中运行flutter create ./,它会生成所有丢失的文件
    • flutter create ./ 没有用,相反我开始构建,通过 ssh 连接到机器,做了flutter build ios 并将文件推回仓库
    • 哦,是的。应该创建Podfile。感谢您清除它
    • @JideGuru 我也遇到了同样的问题,你能在这里分享答案吗?
    猜你喜欢
    • 2020-09-18
    • 2021-01-20
    • 2021-10-17
    • 2021-06-07
    • 2020-07-17
    • 2021-03-23
    • 2022-06-18
    • 1970-01-01
    • 2019-11-07
    相关资源
    最近更新 更多