Search code examples
androidandroid-studiogoogle-play64-bitgoogle-play-console

How to resolve Google Play 64 bit error in AAB release?


I was trying to upload the apk since 2 days. Every time I upload the apk I get the 64 bit error. I know there are other questions on Stackoverflow asking the same thing. But most of them saying the solution for flutter.

enter image description here

As per the Google Documentation I used APK Analyze and found that there are .so files in my project.

Based on documentation I added ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'. But Still I get the same error.

Please check my build.gradle code.

android {


compileSdkVersion 29
buildToolsVersion '29.0.0'
defaultConfig {
    applicationId "com.XXXXX"
    minSdkVersion 15
    targetSdkVersion 29
    versionCode 237
    versionName "3.3.20"
    multiDexEnabled true

    //ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86_64' - not worked
    ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}

applicationVariants.all { variant ->
    variant.resValue "string", "versionName", variant.versionName
}

lintOptions {
    checkReleaseBuilds false
    // Or, if you prefer, you can continue to check for errors in release builds,
    // but continue the build even when errors are found:
    abortOnError false
}

flavorDimensions "default"

buildTypes {

    release {
        shrinkResources true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

dexOptions {
    jumboMode true
    javaMaxHeapSize "4g"
}

productFlavors {
    production {
        applicationId 'com.XXXXX'
    }

    staging {
        applicationId 'com.XXXXX.staging'
    }
}

// Add this block and enable/disable the parameters as follows
bundle {
    density {
        // Different APKs are generated for devices with different screen densities; true by default.
        enableSplit true
    }
    abi {
        // Different APKs are generated for devices with different CPU architectures; true by default.
        enableSplit true
    }
    language {
        // This is disabled so that the App Bundle does NOT split the APK for each language.
        // We're gonna use the same APK for all languages.
        enableSplit false
    }
}}

Please help me to solve the issue.

After signed bundle apk creation the .so files are showing same in armeabi-v7a, arm64-v8a, x86, x86_64 folders.


Solution

  • I tried many solution but didn't work. Later I found that there is a RETAINED APK is existing in play console release and which has 32 bit. Then I deactivated it and uploaded the new apk & It worked successfully