我已经将 react-native 从版本升级0.64.1
到了,0.65.0-rc.3
因为需要从 8 月 1 日 21 日起将捆绑包发布到 Google Play。我正在使用升级助手targetSdk=30
升级信函现在我收到错误:./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"
}