【问题标题】:React Native: This release is not compliant with the Google Play 64-bit requirementReact Native:此版本不符合 Google Play 64 位要求
【发布时间】:2020-01-24 08:55:29
【问题描述】:

当我在Google Play 中发布我的React Native App 时,我收到了这个错误:

此版本不符合 Google Play 64 位要求

以下 APK 或 App Bundle 可用于 64 位设备,但它们只有 32 位本机代码:9 和 24。

在您的应用中包含 64 位和 32 位本机代码。使用 Android App Bundle 发布格式自动确保每个设备架构只接收它需要的本机代码。这样可以避免增加应用的整体大小。

如何解决此错误?

【问题讨论】:

标签: android react-native google-play react-native-android


【解决方案1】:

您需要将以下内容添加到您的android/app/build.gradle 文件中:

abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"

具体来说,您需要为列表中已有的任何 32 位 ABI 添加 64 位 ABI。

【讨论】:

  • 我要不要把这个放在对象defaultConfig => ndk { ... }
  • 是的!虽然,如果您有嵌入本机代码的依赖项,您可能还必须升级它们。了解的最佳方法是使用 android Studio APK Analyzer 查看您的 APK,查看您拥有哪些 32 位和 64 位库并确保两个列表相同
【解决方案2】:

React Native 将支持 64 位的 android 开始版本 0.59

https://github.com/facebook/react-native/issues/2814#issuecomment-457688789

【讨论】:

    猜你喜欢
    • 2020-03-07
    • 2019-12-22
    • 1970-01-01
    • 2020-04-25
    • 2019-09-25
    • 1970-01-01
    • 2020-10-27
    • 2020-08-02
    • 2020-05-23
    相关资源
    最近更新 更多