React-native0.65(targetSdk=30)androidbuild由于react-native-reanimated而失败

我已经将 react-native 从版本升级0.64.1到了,0.65.0-rc.3因为targetSdk=30需要从 8 月 21 日起向 Google Play 发布一个包。我正在使用升级助手升级字母到字母现在我收到./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、project、yarn缓存等...
  • 试图明确喷射
  • 升级安卓工作室
  • 将 react-native-reanimated 升级到最新版本

花了几个小时沮丧地发现没有稳定的 react-native 版本来满足 Google 的要求。有什么想法可以让它发挥作用吗?

- - - 编辑 - -

作为临时解决方法,只需更改项目级 gradle 文件中的版本即可:

ext {
  buildToolsVersion = "30.0.2"
  minSdkVersion = 21
  compileSdkVersion = 30
  targetSdkVersion = 30
  ndkVersion = "20.1.5948944"
}

以上是React-native0.65(targetSdk=30)androidbuild由于react-native-reanimated而失败的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>