English 中文(简体)
Android: 无法装入库
原标题:Android: Cannot load library

我正面临一个我完全不知道的情况。 我试图测试我在 C++ 中实施的一种方法, 并且我用 spig 生成包装纸。 编译后, 当我尝试运行程序时, 我有一个错误 : < code>java. lang. UnstasfiedLinkError

缔约国进一步指出:

cannot load library:reloc_library[1311]:33
cannot locate  _Z13recognizeFacePKcS0_ 
...  

然后忽然地回避。

我试图用广告贝壳去调试,并在正确的地点 (data/data/com/mesh/faceAuth/libfaceAuth.so) 找到图书馆,但也有同样的错误。我还从

问题回答

最能猜到您提供了哪些信息, 您想要加载的图书馆需要先加载一些依存信息 。

例如:

System.loadLibrary("bullet");
System.loadLibrary("irrlicht");
System.loadLibrary("gamescript");

gamescript 库需要其它两个库在它之前装入。 否则, 它会给我与您提到的相同的错误。 如果您可以在此张贴您 < code>.mk 文件的一部分, 来建立库, 我可以进一步挖掘这个问题 。

您的错误与 STL 无关 。

您可能在代码中引用一个全球函数 : recognize Face (Char const *, Char const *) 。 也许, 您定义了另一个函数, 例如 recognize Face( char*, char*)





相关问题
Android NDK future extended support for C++

Is there any info about the future of extending the safe C++ header list in the NDK (or maybe some hints to what might be safe to use) ? Or how soon we can expect the next NDK update? Also will there ...

Blocking Dialog from within JNI code

I m writing an app that s basically a wrapper around a 250K JNI. The JNI (a game engine) has APIs like handle_penUp(int x, int y). Sometimes it needs to query the user from inside handle_penUp() (...

Read txt file in res/raw/ within Android NDK

I have a file within my application that I want to have included within the .apk for my android app that is a .txt file. My application is almost entirely written in C through the use of the NDK, ...

File Operations in Android NDK

I am using the Android NDK to make an application primarily in C for performance reasons, but it appears that file operations such as fopen do not work correctly in Android. Whenever I try to use ...

Android - How to enable CheckJni for NDK development?

Can someone please tell me if I m missing something here? I am trying the following commands in shell. $ ./adb shell stop $ ./adb shell setprop dalvik.vm.checkjni true $ ./adb shell start But ...

Android NDK: Autogenerate function declarations?

I am trying to use a pre-existing native C library in my android project.. The library builds just fine with the NDK tools... Now what I ve come to understand is that I cannot just call into the ...