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

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

问题描述

我无法赞扬我的应用程序到playstore时出现此错误
我也构建了 Android应用程序捆绑包以上传该应用程序,但再次出现此错误。

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或应用捆绑包可用于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宣布在19年8月的PlayStore上提供的应用程序应提供32位本机库的后续版本为64位。从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

Now to check your apk


  • 打开Android Studio,然后打开任何项目。

  • 从菜单中选择 Build> Analyze 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位体系结构

Upgrade to 64 bit architecture

    // 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天全站免登陆