gpt4 book ai didi

android - React-native 0.65 (targetSdk=30) android build 由于 react-native-reanimated 而失败

转载 作者:行者123 更新时间:2023-12-04 11:28:06 26 4
gpt4 key购买 nike

我已经从版本 0.64.1 升级了 react-native至0.65.0-rc.3因为targetSdk=30需要从 8 月 1 日 21 日起将 bundle 发布到 Google Play。我正在使用 upgrade helper 将信函升级到信函。现在我得到 ./gradlew bundleRelease错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseAssets'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
> Failed to transform react-native-reanimated-65-jsc.aar (project :react-native-reanimated) to match attributes {artifactType=android-assets}.
> Execution failed for JetifyTransform: MyApp/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar.
> Transform's input file does not exist: MyApp/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar. (See https://issuetracker.google.com/issues/158753935)
已经尝试过:
  • 删除 node_modules,重新安装
  • 清理 gradle、项目、 yarn 缓存等...
  • 试图明确地喷射
  • 升级安卓工作室
  • 将 react-native-reanimated 升级到最新版本

  • 由于没有稳定的 react-native 版本来满足 Google 的要求,他们花了几个小时感到沮丧。有什么想法让它发挥作用吗?
    - - - 编辑 - -
    作为临时解决方法,只需更改项目级 gradle 文件中的版本即可:
    ext {
    buildToolsVersion = "30.0.2"
    minSdkVersion = 21
    compileSdkVersion = 30
    targetSdkVersion = 30
    ndkVersion = "20.1.5948944"
    }

    最佳答案

    我刚刚升级到 RN 0.65 stable 并且在 Android 上遇到了同样的错误。我认为这是因为如果你想使用 react-native-reanimated 包 v2.0 升级有点早。他们可能还没有将 Android 升级到 RN 0.65。查看使用 RN Reanimated v. 2.0 的早期升级到 RN 0.64-rc.1 的用户发生的类似问题:https://github.com/software-mansion/react-native-reanimated/issues/1486 .我们需要等待 RN Reanimated 升级他们的库。
    编辑:这是 RN Reanimated incompatibility with RN 0.65 issue on Github 的链接:https://github.com/software-mansion/react-native-reanimated/issues/2290 .
    编辑 2:可以确认升级到 RN Reanimated v.2.3.0-alpha.2 解决了这个问题,并且 Android 构建成功,RN 0.65。

    关于android - React-native 0.65 (targetSdk=30) android build 由于 react-native-reanimated 而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68663941/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com