Today, when using Android studio, suddenly found that the code is correct, so package introduced, each version introduced, but has been the error:
Java.lang.UnsatisfiedLinkError:Couldn ' t load serphone from loader dalvik.system.pathclassloader11-30 11:13:18.766 29255-29255/com.personal.tai.ronglianim e/androidruntime: At java.lang.Runtime.loadLibrary (runtime.java:365) 11-30 11:13:18.766 29255-29255/com.personal.tai.ronglianim e/androidruntime: at java.lang.System.loadLibrary ( system.java:526)
have been unable to find the reason, that is, Gradle is not configured well. And then
In the Build.gradle file, add the following code under Android:
sourcesets{ main{ jnilibs.srcdir ([' Libs '] } }
It's OK to compile again.
Android Studo using JNI error: JAVA.LANG.UNSATISFIEDLINKERROR:COULDN ' t load XXX from loader Dalvik.system.PathClassLoader