【发布时间】:2021-10-10 07:21:47
【问题描述】:
我已经将 react-native 从版本 0.64.1 升级到 0.65.0-rc.3,因为需要 targetSdk=30 从 8 月 21 日起将捆绑包发布到 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、项目、纱线缓存等...
- 试图显式喷射
- 升级安卓工作室
- 将 react-native-reanimated 升级到最新版本
由于没有稳定的 react-native 版本来满足 Google 的要求,他们花了几个小时感到沮丧。有什么想法让它发挥作用吗?
----- 编辑----
作为一种临时解决方法,只需更改项目级 gradle 文件中的版本即可:
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
}
【问题讨论】:
-
请分享您的错误日志
-
@AftabAmin 你可以在这篇文章中看到上面的日志。或者你的意思有什么不同?
-
@matusalem 您能否在真实设备中测试您的解决方案?
-
@olegario 当然,我已经将我的更新发布到了 Google Play Alpha 通道并且它正在工作。
-
我遇到了同样的错误,我只是按照文档docs.swmansion.com/react-native-reanimated/docs/fundamentals/…
标签: android react-native build react-navigation react-native-reanimated-v2