Android的 - JNA库 [英] Android - JNA library
问题描述
您好我使用 JNA 才能够使用外部.dll文件(我不有头文件,但我有这样的文件暴露的函数签名)。
Hello i'm using JNA to be able to use an external .dll(i don't have the header file but i have documentation thus the exposed function signatures).
我已成功地用我的DLL中的Java项目如下的说明这里现在我尝试使用的Android应用程序一样的东西。
I have managed to use my dll in a java project following the instructions here and now i'm trying to use the same thing on an android app.
我imporetd的JNA罐子在我的库还增加了瓶子在我的Buildpath,我得到一个错误
I imporetd the jna jar in my libs and also added the jar in my buildpath and i'm getting an error
The library 'jna-3.5.1.jar' contains native libraries that will not run on the device.
The following libraries were found:
com/sun/jna/linux-amd64/libjnidispatch.so
com/sun/jna/darwin/libjnidispatch.jnilib
com/sun/jna/linux-i386/libjnidispatch.so
com/sun/jna/sunos-x86/libjnidispatch.so
com/sun/jna/sunos-amd64/libjnidispatch.so
com/sun/jna/sunos-sparc/libjnidispatch.so
com/sun/jna/sunos-sparcv9/libjnidispatch.so
任何想法?
推荐答案
这值得一个答案......
This deserves an answer...
你编译的lib您为Android想用?
Did you compile the lib you wanna use for android?
为什么不写围绕这些本地库JNI封装和调用,从你的Android应用?
Why not write a JNI wrapper around those native libs, and invoke that from your android app?
这篇关于Android的 - JNA库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!