添加库时面临UnsatisfiedLinkError

时间:2018-08-22 13:11:27

标签: android android-ndk shared-libraries opencv4android

我在添加扫描库时遇到UnsatisfiedLinkError,如图中所示,当前已经存在许多。因此在jnilibs文件夹中的应用程序中存在各自文件夹中所有abi的信息,扫描库中只有4个abi,如图所示。在运行应用程序时,出现以下错误。

我的应用程序结构如下图所示。

enter image description here

我的logcat如下。

 Process: defsys.com.au.scanningdemo, PID: 4805
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/defsys.com.au.scanningdemo-1/base.apk"],nativeLibraryDirectories=[/data/app/defsys.com.au.scanningdemo-1/lib/arm64, /data/app/defsys.com.au.scanningdemo-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libScanner.so"
        at java.lang.Runtime.loadLibrary(Runtime.java:367)
        at java.lang.System.loadLibrary(System.java:1076)
        at com.scanlibrary.ViewFinalImageActivity.<clinit>(ViewFinalImageActivity.java:63)
        at java.lang.Class.newInstance(Native Method)
        at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2324)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
        at android.app.ActivityThread.access$900(ActivityThread.java:153)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5438)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

0 个答案:

没有答案