为的UnsatisfiedLinkError而libopencv_core.so持有的.apk这个库 [英] UnsatisfiedLinkError for libopencv_core.so while .apk holds this library

查看:407
本文介绍了为的UnsatisfiedLinkError而libopencv_core.so持有的.apk这个库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用JavaCv与我的应用程序在Android上。
所以我也跟着在这里忠告: https://github.com/bytedeco/javacv 如何安装Android 2.2或更新版本。因此以下库下可以找到的 \\库\\ armeabi
libjniopencv_core.so
libopencv_core.so

I want to use JavaCv with my App on Android. Therefore I followed the advice here: https://github.com/bytedeco/javacv on how to install Android 2.2 or newer. As a result the following libraries can be found under \libs\armeabi: libjniopencv_core.so libopencv_core.so

这两个库的所有课程也present在我的apk的classes.dex文件。
仍然出现以下异常:

All classes of both libraries are also present in the classes.dex file of my .apk. And still i get the following exception:

java.lang.UnsatisfiedLinkError中:无法加载库:soinfo_link_image(linker.cpp:1635):无法加载库libopencv_core.so被libjniopencv_core.so需要;造成load_library(linker.cpp:745):库libopencv_core.so找不到

我试图通过

System.loadLibrary("libopencv_core")

System.loadLibrary("opencv_core")

与相同的结果。

如何解决这个问题将是AP preciated任何暗示。

Any hint on how to solve this issue would be appreciated.

EDIT1:

我看看,看看哪些.so文件实际上可能在 /data/app-lib/ccc.android.myappname ...

I had a look to see which .so files could actually be found under /data/app-lib/ccc.android.myappname...

尽管libopencv_core.so和其他文件可以在中找到的lib / armeabi / 在我的apk文件只在其中的一些可用于我的活动 /data/app-lib/ccc.android.myappname 。其他人只是忽略一些未知的原因。

Despite libopencv_core.so and other files can be found under lib/armeabi/ in my .apk only some of them are available for my activity under /data/app-lib/ccc.android.myappname. The others are just ignored for some unknown reason.

能有人帮助,我不知道是怎么回事。

Can somebody help, i have no idea what is going on.

感谢您。

推荐答案

下面的解决方案,我发现:

Here the solution i found:

我在Github上讨​​论过这件事上JavaCv板:

I discussed this matter on the JavaCv board on Github:

https://github.com/bytedeco/javacv/issues/28

问题可能成为历史的下一个版本,但是对于此期间的操作如下:

The Issue might be history with the next release, but for the meantime do as follows:

使用JavaCv首次运行之前:

Before using JavaCv for the first time run:

static {
        System.loadLibrary("tbb");
        System.loadLibrary("opencv_core");
        System.loadLibrary("jniopencv_core");
}

在某些设备(或场合)预期的加载顺序弄混......

On some devices (or occasion) the intended load order get mixed up...

这篇关于为的UnsatisfiedLinkError而libopencv_core.so持有的.apk这个库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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