Reputation: 221
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
add "arm64-v8a" to end of abiFilters line in release mode:
abiFilters "armeabi-v7a","x86_64", "x86","arm64-v8a"
create new folder in jniLibs folder
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
Reputation: 1
Are you going to publish to PlayStore an .apk or .aab?
I've made it work using .apk with the following steps:
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