mat*_*lem 5 android build react-native react-navigation react-native-reanimated-v2
我已经将 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)
Run Code Online (Sandbox Code Playgroud)
已经尝试过:
花了几个小时沮丧地发现没有稳定的 react-native 版本来满足 Google 的要求。有什么想法可以让它发挥作用吗?
- - - 编辑 - -
作为临时解决方法,只需更改项目级 gradle 文件中的版本即可:
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
}
Run Code Online (Sandbox Code Playgroud)
我刚刚升级到 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 升级他们的库。
编辑:以下是 Github 上 RN Reanimated 与 RN 0.65 不兼容问题的链接: https: //github.com/software-mansion/react-native-reanimated/issues/2290。
编辑 2:可以确认升级到 RN Reanimated v.2.3.0-alpha.2 可以解决此问题,并且 Android 构建可以在 RN 0.65 上成功。
| 归档时间: |
|
| 查看次数: |
1274 次 |
| 最近记录: |