How to Include 64-bit and 32-bit native code in my app

痴心易碎 提交于 2019-12-13 03:40:43

问题


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.

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'

回答1:


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.

Now to check your apk

  • Open Android Studio, and open any project.
  • From the menu, select Build > Analyze APK and select the APK which you want to evaluate.

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.

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'
   }
}

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



来源:https://stackoverflow.com/questions/57712430/how-to-include-64-bit-and-32-bit-native-code-in-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!