【问题标题】:Error when trying to build a React Native application with EAS尝试使用 EAS 构建 React Native 应用程序时出错
【发布时间】:2022-11-10 22:29:36
【问题描述】:

我正在尝试使用 Expo 和 rnmapbox/maps 模块构建一个 React Native 应用程序,其中包括一些自定义本机代码。

到目前为止,我可以毫无问题地构建应用程序,至少对于 Android,这是我的目标平台。但突然,它停止工作并显示以下错误日志:

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin class 'org.gradle.api.plugins.BasePlugin'.
   > Could not find method maven() for arguments [build_1quotit9ccucu377qnhf7kv5h$_run_closure1$_closure3$_closure5@4a87f9f7] on configuration ':app:archives' of type org.gradle.api.in
ternal.artifacts.configurations.DefaultConfiguration.

有什么问题,我该如何解决?

【问题讨论】:

标签: react-native expo mapbox eas


【解决方案1】:

问题似乎出在 Mapbox 上。在eas build 下的 Android 版本中,我们遇到了与您相同的错误。我们刚刚删除了 rnmapbox/maps 依赖项并注释掉了所有相关代码,我们的构建正在通过。

【讨论】:

    【解决方案2】:

    我将"image": "latest" 字段添加到eas.json 配置中,它似乎解决了这个问题。

    显然,旧版本存在错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-07-04
      • 1970-01-01
      • 2022-11-10
      • 2023-02-25
      • 2019-04-02
      • 2015-07-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多