此版本不符合 Google Play 64 位要求 react native android
This release is not compliant with the Google Play 64-bit requirement react native android
我已经将我的 React native 版本 0.57.1 升级到 0.59.1 并修复了所有库问题。成功构建后,我将 .aap 文件上传到 Play 商店,但出现以下错误:
错误
此版本不符合 Google Play 64 位要求
以下 APK 或 App Bundle 可用于 64 位设备,但它们只有 32 位本机代码:21。
在您的应用程序中包含 64 位和 32 位本机代码。使用 Android App Bundle 发布格式自动确保每个设备架构只接收它需要的本机代码。这样可以避免增加应用的整体大小。
如果有人能解决这个问题,请告诉我谢谢!
这是我的 build.gradle
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "1.0.0-beta01"
googlePlayServicesAuthVersion = "17.0.0"
}
package.json
"react": "16.8.3",
"react-native": "^0.59.1",
添加 abi 过滤器("arm64-v8a" 和 "x86-64")
android {
...
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
// In case, if you're using `ndk`
defaultConfig {
ndk {
// Tells Gradle to build outputs for the following ABIs and package
// them into your APK.
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) {
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
...
我已经将我的 React native 版本 0.57.1 升级到 0.59.1 并修复了所有库问题。成功构建后,我将 .aap 文件上传到 Play 商店,但出现以下错误:
错误 此版本不符合 Google Play 64 位要求 以下 APK 或 App Bundle 可用于 64 位设备,但它们只有 32 位本机代码:21。 在您的应用程序中包含 64 位和 32 位本机代码。使用 Android App Bundle 发布格式自动确保每个设备架构只接收它需要的本机代码。这样可以避免增加应用的整体大小。
如果有人能解决这个问题,请告诉我谢谢!
这是我的 build.gradle
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "1.0.0-beta01"
googlePlayServicesAuthVersion = "17.0.0"
}
package.json
"react": "16.8.3",
"react-native": "^0.59.1",
添加 abi 过滤器("arm64-v8a" 和 "x86-64")
android {
...
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
// In case, if you're using `ndk`
defaultConfig {
ndk {
// Tells Gradle to build outputs for the following ABIs and package
// them into your APK.
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) {
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
...