I'm trying to use a native library but I'm getting this error and I can't figure out how to solve it. I'm with this for more than a day by now. Checked a lot of questions and nothing worked. The error is always the same when calling System.loadLibrary("createdata")
:
UnsatisfiedLinkError: Couldn't load createdata from loader dalvik.system.PathClassLoader
Attempt 1: Just keep the file in the default folder - src/main/jniLibs/armeabi/libcreatedata.so
Attempt 2: Move the file to another folder - src/main/libs/armeabi/libcreatedata.so - and added this to the module's build.gradle:
android {
...
sourceSets.main {
jni.srcDirs = [] //disable automatic ndk-build call
jniLibs.srcDir 'src/main/libs/'
}
}
NOTES
I called libcreatedata.so to the lib's file
The file is within the folders armeabi, armeabi-v7a and arm64-v8a
I checked the generated .apk, and it contains the file in lib/armeabi (and others)
Android Studio 2.1.1
Gradle:
com.android.tools.build:gradle:2.1.0 https\://services.gradle.org/distributions/gradle-2.10-all.zip
UPDATE
As per request, here are the apk's folding: