0

When I try put application in google store I see this :

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. I have only 32 - bit native code I do this on build gradle :

From August 1, 2019 all releases must be compliant with the Google Play 64-bit requirement.

Include 64-bit and 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code it needs. This avoids increasing the overall size of your app.

ndk {
            moduleName "***"
                abiFilters "armeabi", "armeabi-v7a", "x86_64", "mips",'arm64-v8a'
        }



        task nativeLibsToJar(type: Jar, description: 'create a jar archive of the native libs') {
            destinationDir file("$buildDir/native-libs")
            baseName 'native-libs'
            from fileTree(dir: 'libs', include: '**/*.so')
            into 'lib/'
        }

        tasks.withType(JavaCompile) {
            compileTask -> compileTask.dependsOn(nativeLibsToJar)
        }
        splits {
            abi {
                include  "armeabi-v7a", "arm64-v8a"
            }
        }

        applicationVariants.all { variant ->
            variant.outputs.each { output ->
                // For each separate APK per architecture, set a unique version code as described here:
                // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
                def versionCodes = ["armeabi-v7a":1, "arm64-v8a":2]
                def abi = output.getFilter(OutputFile.ABI)
                if (abi != null) {  // null for the universal-debug, universal-release variants
                    output.versionCodeOverride =
                            versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
                }
            }
        }

But I can not add apk on google store

enter image description here

edit

enter image description here

edit

[![enter image description here][3]][3]

edit [![enter image description here][4]][4]

kiki Kala2
  • 399
  • 5
  • 19

1 Answers1

-1

Here all what you need about supporting 64-bit architectures

https://inneka.com/programming/android/how-to-include-so-library-in-android-studio-2/

check your project structure and include libraries like below..

 project/
├──libs/
|  └── *.jar       <-- if your library has jar files, they go here
├──src/
   └── main/
       ├── AndroidManifest.xml
       ├── java/
       └── jniLibs/ 
           ├── arm64-v8a/                       <-- ARM 64bit
           │   └── yourlib.so
           ├── armeabi-v7a/                     <-- ARM 32bit
           │   └── yourlib.so
           └── x86/                             <-- Intel 32bit
               └── yourlib.so
Dreamer
  • 517
  • 1
  • 4
  • 11
  • I do this : ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' but steal I can not put apk on google store . What I should change ? – kiki Kala2 Jan 16 '20 at 17:33
  • Basically check your project structure and include libraries for 64bit – Dreamer Jan 16 '20 at 18:05
  • Dreamer so I have to delete all I do in build.gradle ? – kiki Kala2 Jan 16 '20 at 18:44
  • What is the structure of your project ? where is the place of **.so files? check them if you not see folders of 64 bit create folders for 64bit and copy manually **. so files ..and build your app – Dreamer Jan 16 '20 at 18:47
  • I post screen which structure is a correct ? and I delete from build.gradle ndk ababiFilters ect – kiki Kala2 Jan 16 '20 at 18:55
  • /armeabi/libfoo.so ------- /armeabi-v7a/libfoo.so ------- /arm64-v8a/libfoo.so--------- /x86/libfoo.so -------- /x86_64/libfoo.so – Dreamer Jan 16 '20 at 19:04
  • You need to read this if above solution didnt work ... https://developer.android.com/studio/build/configure-apk-splits.html – Dreamer Jan 16 '20 at 19:07
  • Now I get this error : java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/***/lib/arm64/libpackage.so" is 32-bit instead of 64-bit – kiki Kala2 Jan 17 '20 at 05:46
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/206122/discussion-between-kiki-kala2-and-dreamer). – kiki Kala2 Jan 17 '20 at 06:23
  • check here https://stackoverflow.com/questions/48678598/java-lang-unsatisfiedlinkerror-dlopen-failed – Dreamer Jan 17 '20 at 06:27