Unsatified链接错误:OpenCV的Andr​​oid版 [英] Unsatified Link Error: Android OpenCV

查看:296
本文介绍了Unsatified链接错误:OpenCV的Andr​​oid版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循这个指南:

<一个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:

http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html

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的Andr​​oid版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆