如何在我的应用程序中包含 64 位和 32 位本机代码 [英] How to Include 64-bit and 32-bit native code in my app

查看:13
本文介绍了如何在我的应用程序中包含 64 位和 32 位本机代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法将我的应用上传到 Playstore 出现此错误我还构建了Android App Bundle"来上传应用程序,但再次出现此错误.

I can't uplaod my app to playstore got this error I have also build "Android App Bundle" to upload the app but again got this error.

此版本不符合 Google Play 64 位要求以下 APK 或 App Bundle 适用于 64 位设备,但它们只有 32 位本机代码:111.

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: 111.

defaultConfig {
        applicationId "com.iqvis.com.buenosdias"
        minSdkVersion 17
        targetSdkVersion 26
        versionCode 111
        versionName "10.11"
        multiDexEnabled true
        ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

推荐答案

2017 年,Google 宣布在 2019 年 8 月 PlayStore 上的应用程序应提供 64 位的 32 位本机库的后续版本.自 Android 5( Lollipop ) 天起支持 64 位.

In 2017, Google announced that in Aug'19 Apps on the PlayStore should provide the subsequent version of 32 bit native libraries in 64 bit. 64 bit is supported since Android 5( Lollipop ) days.

现在检查您的 apk

  • 打开 Android Studio,然后打开任何项目.
  • 从菜单中选择构建 > 分析 APK,然后选择您要评估的 APK.
  • Open Android Studio, and open any project.
  • From the menu, select Build > Analyze APK and select the APK which you want to evaluate.

现在,如果在分析器中查看 lib 文件夹,并且在其中看到任何 .so,那么您拥有 32 位库,或者如果您拥有任何 armeabi-v7a 或 x86,那么您有 32 位库如果您没有看到 .so 文件,则您的应用不需要升级版本.

Now, if in the analyzer you look into lib folder, and in that you see any .so then you have 32-bit libraries or if you have any armeabi-v7a or x86, then you have 32-bit libraries If you see no .so files, then your app requires no upgrade versions.

升级到 64 位架构

    // Your app's build.gradle
apply plugin: 'com.android.app'

android {
   compileSdkVersion 27
   defaultConfig {
       appId "com.google.example.64bit"
       minSdkVersion 15
       targetSdkVersion 28
       versionCode 1
       versionName "1.0"
       ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
   }
}

有关详细信息,请查看此 https://www.youtube.com/watch?v=E96vmWkUdgA

For more info check this https://www.youtube.com/watch?v=E96vmWkUdgA

这篇关于如何在我的应用程序中包含 64 位和 32 位本机代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆