我正在使用 react-native 和 EXPO CLI 来构建 android apk 文件。但我无法上传到 Play 商店。我收到一条警告消息
Warning This release is not compliant with the Google Play 64-bit requirement
The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: 1.
From August 1, 2019 all releases must be compliant with the Google Play 64-bit requirement.
我正在使用的版本
"dependencies": {
"expo": "^32.0.0",
"prop-types": "^15.7.2",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-navigation": "^3.4.1"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
},
帮助我按照 Google Play 64 位要求构建 app bundle。
最佳答案
对于高于版本 0.59
的非 Expo 项目,请检查您的 android/app/build.gradle
。如果您在 defaultConfig
中设置了 ndk
,请确保它包含所有架构 abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64 "
.
defaultConfig {
...
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
关于android - 如何使用 Expo CLI 为 android 构建 64 位 native 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55965144/