Caused by: java.lang.UnsatisfiedLinkError: Couldn't load zbar: findLibrary returned null

如果你用了shareSDK 并且你还使用了其他的第三方,里面包含so文件文件,但是出现了如下的异常:

12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: FATAL EXCEPTION: Thread-1274
12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: java.lang.ExceptionInInitializerError
12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime:     at com.zbar.lib.decode.DecodeHandler.decode(DecodeHandler.java:56)
12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime:     at com.zbar.lib.decode.DecodeHandler.handleMessage(DecodeHandler.java:38)
12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:99)
12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:137)
12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime:     at com.zbar.lib.decode.DecodeThread.run(DecodeThread.java:44)
12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime:  Caused by: java.lang.UnsatisfiedLinkError: Couldn't load zbar: findLibrary returned null** 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at java.lang.Runtime.loadLibrary(Runtime.java:365) 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at java.lang.System.loadLibrary(System.java:535) 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at com.zbar.lib.ZbarManager.<clinit>(ZbarManager.java:6) 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at com.zbar.lib.decode.DecodeHandler.decode(DecodeHandler.java:56) 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at com.zbar.lib.decode.DecodeHandler.handleMessage(DecodeHandler.java:38) 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at android.os.Looper.loop(Looper.java:137) 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: at com.zbar.lib.decode.DecodeThread.run(DecodeThread.java:44) 

如果你看到这句话那么说明你的so文件在进行连接的时候出现了错误,我的解决方案是:

  • 这个原因好像是so文件出现了问题 ,你能做的就是在jnilibs目录下创建一个文件夹: armeabi-v7a文件夹
    将你的找不到的so文件放到里面备份一下。

格外要注意的是:eclipse放在libs下,AS放在jnilibs下 别放错目录!

你可能感兴趣的:(exception,异常)