I have an app that needs a .so library(ndk). It is compiled for armeabi-v7a. I compile the project with armeabi-v7a in Android Studio 1.5.1. When I run the project on a device(Android 4.4.2 and Android 6.0) it works just fine, the .so lib loads successfully.
The problem: I really need to test the app into an emulator so I've created an emulator for Android 6.0 with ARM(armeaabi-v7a) but unfortunately the .so is not loaded successfully and I get the following error: java.lang.UnsatisfiedLinkError.
03-30 14:52:12.654 16379-16379/com.mondelez.trylive I/tiInterface: Trying to load libtiAndroidAR2.so
03-30 14:52:12.867 16379-16379/com.mondelez.trylive E/tiInterface: WARNING: Could not load libtiAndroidAR2.so: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.mondelez.trylive-2/lib/arm/libtiAndroidAR2.so: has text relocations
03-30 14:52:12.868 16379-16379/com.mondelez.trylive I/ti.dfusionmobile.tiInterface: Checking interface integrity
03-30 14:52:12.906 16379-16379/com.mondelez.trylive E/art: No implementation found for boolean ti.dfusionmobile.tiInterface.JNIglobalInitialize(int) (tried Java_ti_dfusionmobile_tiInterface_JNIglobalInitialize and Java_ti_dfusionmobile_tiInterface_JNIglobalInitialize__I)
I also followed these posts:
- Application crashes in emulator when loading native shared library, but works fine on a physical device
- Android NDK java.lang.UnsatisfiedLinkError: findLibrary returned null
- libavcodec.so: has text relocations
But didn't help.
It seems that the lib is incompatible but like I said: it is built with armeabi-v7a. Anyone have any suggestions or hints?
Here is my build.gradle:
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.my.app"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
}
The .so file is located in: project/app/src/main/jniLibs/armeabi-v7a/myLib.so.