Cannot find .so file on 64-bit Android device.

Using aviary android sdk using android studio and gradle build. The application was created normally on all devices with a 32-bit architecture.

The same application gives the following error in a 64-bit device [For example. Sony C4]

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.myapp/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libaviary_moalite.so" 

part of gredle.build

 dependencies { ... compile 'com.android.support:multidex:1.0.0' compile 'com.facebook.fresco:fresco:0.8.1+' compile 'com.facebook.fresco:imagepipeline-okhttp:0.8.1+' compile 'com.android.support:appcompat-v7:22.2.1' compile 'com.adobe.creativesdk:image:4.0.0' } 

Link This did not work

Unable to find ARM64 NDK built-in library using Android Studio (1.3 RC)

The same error if any solution used is used.

How to use 32-bit native libraries on a 64-bit Android device

Getting an error, for example

 Error:(16, 0) Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration. 

I'm not sure what I'm doing wrong or not supported at all.

+4
android android-ndk aviary adobecreativesdk
source share
2 answers

It looks like some of the packages you use come with 64-bit libraries, but some of them don't. To save only AP-32K, I use

 android { splits { abi { enable true reset() include 'armeabi-v7a' } } } 

You can also play with include 'armeabi' if that matters.

+11
source share

I solved this case with the following steps:

  • I moved the armeabi and x86 folders from: \ src \ main \ jniLibs to: \ libs

    Be sure to move all the files in these folders: * .so files must be located there.

  • I added the following to my build.gradle:

     sourceSets.main { jniLibs.srcDir 'src/main/libs' } 
  • Clear + rebuild project

    * if you are using multidex, make sure that these lines have been added to build.gradle:

     defaultConfig { multiDexEnabled true } dexOptions { preDexLibraries false javaMaxHeapSize "4g" } 

In addition, this should be added to the manifest file:

 <application android:name="android.support.multidex.MultiDexApplication"> /application> 

Hope this helps.

+5
source share

All Articles