java.lang.UnsatisfiedLinkError: Couldn't loadXX from loader dalvik.system

java.lang.UnsatisfiedLinkError: Couldn't xiaobai-jni from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.duicky-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.duicky-1, /vendor/lib, /system/lib]]]: findLibrary returned null
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at java.lang.Runtime.loadLibrary(Runtime.java:358)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at java.lang.System.loadLibrary(System.java:526)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at com.duicky.MainActivity.<clinit>(MainActivity.java:52)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at java.lang.Class.newInstanceImpl(Native Method)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at java.lang.Class.newInstance(Class.java:1208)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.app.Instrumentation.newActivity(Instrumentation.java:1073)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2154)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2327)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.app.ActivityThread.access$800(ActivityThread.java:151)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1225)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.os.Handler.dispatchMessage(Handler.java:102)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.os.Looper.loop(Looper.java:136)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at android.app.ActivityThread.main(ActivityThread.java:5281)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at java.lang.reflect.Method.invokeNative(Native Method)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at java.lang.reflect.Method.invoke(Method.java:515)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:932)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:748)
08-13 16:25:59.829 E/AndroidRuntime( 2098):     at dalvik.system.NativeStart.main(Native Method)
08-13 16:25:59.839 W/ActivityManager(  551): skipCurrentReceiverLocked app=ProcessRecord{42086b40 2098:com.duicky/u0a43} app.curReceiver=null killbyAm=false
08-13 16:25:59.839 W/ActivityManager(  551): queue:foreground mPendingBroadcast null
08-13 16:25:59.839 W/ActivityManager(  551): queue:background mPendingBroadcast null
08-13 16:25:59.839 W/ActivityManager(  551):   Force finishing activity com.duicky/.MainActivity

解决方案:

 出现这样的错误,可能你生成的so 库文件没有push 进 系统,导致apk 找不到库加载。

 尝试执行 : adb push app/src/main/jniLibs/armeabi/libxiaobai-jni.so  /system/lib/



你可能感兴趣的:(java.lang.UnsatisfiedLinkError: Couldn't loadXX from loader dalvik.system)