Having the above error in your Android JNI app? Read on...
Up front, I\'ll say that I\'ve already solved this, in my own way, but I feel something in the Android bu
No need to root the device..deploy app on emulator and browse the folder
Add this following code inside your gradle file
//libs is the location of your library's folder, It varies in diffarent projects like src/main/libs etc.
android {
sourceSets.main {
jniLibs.srcDir 'libs'
}
}
So, Android Studio keep on looking native libs inside jniLibs folder. this code will change the path of android studio to look libs in libs folder
If you have a native project with "libXYZ.so", make sure that /system/lib/libXYZ.so does not exist on your device. There is a painful workaround: use
System.load("/data/data/your.package.name/lib/libXY.so")
instead of System.loadLibrary().
UnsatisfiedLinkerror is solved by this.Build your .so file again by "ndk_build"
If you are trying to run your app in a simulator, then make sure that you have specified the correct architecture in Run -> Run Configurations -> Target (you may need to add the required simulator using Window -> Android Virtual Device Manager).
I had the same problem when trying to execute an app in an Intel simulator, while the app was using a library precompiled for the ARM.
In my case, while making a System Application the issue was related to permissions. After putting the ".so" files into /system/lib/
or /system/vendor/lib/
directory, I modified the default allocated permissions 600 to 755. It worked well.