android - 如何使用 Expo CLI 为 android 构建 64 位 native 代

我正在使用 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/

相关文章:

.net - 内容文件更改后 Visual Studio 未重建

c# - WPF 应用程序中的间歇性构建问题

xcode - 学习和理解 Xcode 构建系统

java - 在应用程序中显示构建时间戳

android - 通过 TeamCity 为 Android 持续集成。首选工具?

c - 在配置脚本中处理 CFLAGS 的最佳实践?

android - 管理 Android 应用商店(谷歌/亚马逊/等)的代码/构建?

maven - 在 Android Studio 中优化构建时间

msbuild - Mercurial/Kiln + MSBuild + MSTest 的持续集成建

java - 如何让 Maven 自动重试(从失败的模块恢复)?