应用程序无法使用 React Native 0.57.7 和 64 位 arm 架构打开。32位工作正常



React Native 应用程序无法使用 RN 0.57.7 和 64 位 arm 架构打开。 32位工作正常。 而且gradlew bundleRelease也无法创建捆绑文件。

react-native run-android运行成功,但应用无法打开。 这是我的构建 gradle 文件:

splits {
abi {
reset()
enable true
universalApk false  // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a":3, "x86_64":4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) {  // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}

如果拆分和应用程序变体,我将仅更新 32 位 arm 架构,我的应用程序工作文件。include "armeabi-v7a", "x86"def versionCodes = ["armeabi-v7a":1, "x86":2].

要支持 64 位架构,您的 ReactNative 版本应至少为 0.59.1。 另外,请记住,从 2019 年 8 月 1 日开始,Google Play 将仅接受 64 位版本的应用程序。这是一篇关于它的好文章。也许有点过时了,因为 RN 的最新稳定版本现在是 0.61.5,但非常有用。要以新格式捆绑 Android 应用(.aab,.apk不再被 Google Play 接受(,您的 RN 版本应大于或等于 0.60

最新更新