开发者

libxml2 linking issues

I am running an Android project, it had missing libraries that I added, but there is no jar for libxml2, I keep getting this linking error:

Originating from System.loadLibrary("xml2");

07-06 15:46:54.196: ERROR/AndroidRuntime(322): Caused by: java.lang.UnsatisfiedLinkError: Library xml2 not found 07-06 15:46:54.196: ERROR/AndroidRuntime(322): at java.lang.Runtime.loadLibrary(Runtime.java:461) 07-06 15:46:54.196: ERROR/Andro开发者_如何学GoidRuntime(322): at java.lang.System.loadLibrary(System.java:557) 07-06 15:46:54.196: ERROR/AndroidRuntime(322): at com.wiyun.engine.WiEngineDemos.(WiEngineDemos.java:49)

Do i need to add .so to my Android project configuration? How? Thanks.


libxml2 is a C library, not a java library unless you have found a version that has been ported to java. You need to compile it and then use Android's NDK to access it or you need to try and find a java port.


07-06 15:46:54.196: ERROR/AndroidRuntime(322): Caused by: java.lang.UnsatisfiedLinkError: Library xml2 not found

It looks to me that your library is simply not found. Are you sure libxml2.so is included in your APK and being copied to /data/data/your.package.name/lib/?

For a .so to be included in your APK it generally needs to be under obj/local/armeabi (If you have a jni folder under your project and using the Android.mk / ndk-build system, it will automatically be 'installed' here)


It appears to have been an issue with Eclipse... If anyone has the same issue they should simply restart Eclipse, and check that all NDK configurations are properlly set, like name matching, etc...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜