Date: 2015jul24
OS: Android
Language: Java
Keywords: JNA
Q. When I try to use jna for Android I get this:
The library 'jna.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
How can I fix this?
A. To make JNA work on Android:
- Remove other platforms from jnaXXX.jar
(Rename to .zip, edit and rename back to .jar)
- Move libjnidispatch.so to libs\armeabi of app