首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >React Native Expo构建因cocoapods版本而失败

React Native Expo构建因cocoapods版本而失败
EN

Stack Overflow用户
提问于 2021-11-26 07:31:40
回答 2查看 409关注 0票数 0

我正在尝试运行一个建筑博览会,但由于Cocoapods过时而不断运行错误。

代码语言:javascript
复制
    [!] `RNFBApp` requires CocoaPods version `>= 1.10.2`, which is not satisfied by your current version, `1.10.1`.
    Error: Your project requires a newer version of CocoaPods, you can update it in the build profile in eas.json by either:
     - changing the current version under key "cocoapods"
     - switching to an image that supports that version under key "image"

我已经尝试按照说明用我想要的版本更新我的eas文件,但它似乎被忽略了:/

代码语言:javascript
复制
    {
      "cli": {
        "version": ">= 0.38.1"
      },
      "build": {
        "development": {
          "distribution": "internal",
          "android": {
            "gradleCommand": ":app:assembleDebug"
          },
          "ios": {
            "buildConfiguration": "Debug",
            "cocoapods": "1.11.2"
          }
        },
        "preview": {
          "distribution": "internal"
        },
        "production": {}
      },
      "submit": {
        "production": {}
      }
    }

有人知道我该怎么解决这个问题吗?我的构建在本地运行良好,并在模拟器上加载,不用担心。

EN

回答 2

Stack Overflow用户

发布于 2021-11-30 21:51:39

既然我已经解决了这个问题,我将分享我的故事:

我在Windows上运行以下命令:

eas build --profile release --platform ios

下面是我的eas.json的相关部分:

代码语言:javascript
复制
  {
    "build": {
      "release": {
        "android": {
          "buildType": "app-bundle",
          "gradleCommand": ":app:bundleRelease"
        },
        "ios": {
          "cocoapods": "1.11.2"
        }
      }
    }
 }

在我的例子中,向eas.json添加cocoapods密钥解决了这个问题。

票数 1
EN

Stack Overflow用户

发布于 2021-12-02 08:48:06

我也有同样的问题,你所要做的就是用它替换你的代码,一切都会好起来的。

代码语言:javascript
复制
{
  "cli": {
        "version": ">= 0.38.3"
   },
   "build": {
         "development": {
             "distribution": "internal",
          "android": {
              "gradleCommand": ":app:assembleDebug"
           },
           "ios": {
               "buildConfiguration": "Debug",
                "cocoapods": "1.11.2"
           }
     },
    "preview": {
         "distribution": "internal"
    },
    "production": {
      "ios": {
       "cocoapods": "1.11.2"
     }
    }
 },
  "submit": {
     "production": {}
  }
}

您需要将此代码添加到build中的production

代码语言:javascript
复制
 "ios": {
     "cocoapods": "1.11.2"
   }

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70120883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档