Unsatified链接错误:OpenCV的Android版 [英] Unsatified Link Error: Android OpenCV
问题描述
我遵循这个指南:
<一个href=\"http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html\" rel=\"nofollow\">http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
但我仍然得到这个错误:
E / AndroidRuntime(916):java.lang.UnsatisfiedLinkError中:无法从装载机dalvik.system.PathClassLoader [DexPathList [zip文件加载opencv_java248 \"/data/app/com.example.smartlab-2.apk\"],nativeLibraryDirectories=[/data/app-lib/com.example.smartlab-2, /系统/ lib目录]]]:findLibrary返回null
当我把这个行:
的System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
是不是你的下面这个教程呢?
您链接的一个不具备行:
的System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
和它说:
请注意调用的System.loadLibrary(Core.NATIVE_LIBRARY_NAME)。这个
命令之后必须每一次Java进程使用之前执行
任何本地OpenCV的方法。如果你不调用它,你会得到
UnsatisfiedLink错误。如果你尝试加载你也将得到错误
OpenCV的,当它已经被加载
块引用>I followed this guide:
but am still getting this error:
E/AndroidRuntime(916): java.lang.UnsatisfiedLinkError: Couldn't load opencv_java248 from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.smartlab-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.smartlab-2, /system/lib]]]: findLibrary returned null
When I call this line:
System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
解决方案Aren't you following this tutorial instead?
The one you linked does not have the line:
System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
And it says:
Note the call to System.loadLibrary(Core.NATIVE_LIBRARY_NAME). This command must be executed exactly once per Java process prior to using any native OpenCV methods. If you don’t call it, you will get UnsatisfiedLink errors. You will also get errors if you try to load OpenCV when it has already been loaded
这篇关于Unsatified链接错误:OpenCV的Android版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!