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

2020-04-23 03:01发布

问题:

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