Javad Ghasemi
Javad Ghasemi

Reputation: 221

How to publish 64 bit bundle app to google store with 32-bit .so files

I've developed an Android app with Android Studio 2021 and have used some .so files. When I debug the app it works successfully with this Gradle configs:

android {
    compileSdk 30

defaultConfig {
    applicationId "com.sample"
    minSdk 21
    targetSdk 30
    versionCode 6
    versionName "2022"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
    main {
        jniLibs.srcDirs = ['src/main/jnilibs']
    }
}

buildTypes {
    release {
        debuggable false
        minifyEnabled false
        shrinkResources false
        proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
        proguardFile 'proguard-android.txt'
        ndk {
            abiFilters "armeabi-v7a","x86_64", "x86"
        }
    }
    debug {
        ndk {
            abiFilters  "armeabi-v7a","x86_64", "x86"
        }
    }
}

Then I decided to publish app on the google store, The store returned this error:

This release is not compliant with the Google Play 64-bit requirement.

Then I did

  1. add "arm64-v8a" to end of abiFilters line in release mode:

    abiFilters "armeabi-v7a","x86_64", "x86","arm64-v8a"

  2. create new folder in jniLibs folder

  3. copy .so files from armeabi-v7a folder to arm64-v8a folder

The store error disappeared But a new problem raised : When I generate APK file, the app crashes with this error

No implementation found for int com.xxxx.xxx at com.wifi.xxxx(Native Method)

Can anyone advice what can I do?

Upvotes: 0

Views: 506

Answers (1)

SidechainMate
SidechainMate

Reputation: 1

Are you going to publish to PlayStore an .apk or .aab?

I've made it work using .apk with the following steps:

  • decompile apk
  • inside lib folder create a new folder called arm64-v8a
  • copy the armeabi-v7a folder inside the arm64-v8a folder (yes, that way worked to me)
  • recompile

in my case no need of those lines: ndk { abiFilters "armeabi-v7a","x86_64", "x86" }

you can have a more detailed idea following this Link

Anyway, those days PlayStore require you to upload a .aab, so I'm currently looking for a way to make it work with .aab

Upvotes: 0

Related Questions