I’m trying to build an app using a library packed in a JAR file.
When I call one of the functions I get this error:
Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing thelibrary.class
I’ve check the source code of the library and I think it crushes when loading some .so files ( System.loadLibrary(“usb-1.0”);
those files do exists in the JAR project under libs/armeabi (libusb-1.0.so)
I guess the .so files are not packed with the JAR, so how do I get them to be found in my project ?
(tried to copy them to libs/armeabi but the same exception is thrown….)
I do not get any link / build errors….
Thanks.
An ordinary JAR file will not work for distributing something that is dependent upon an Android NDK-compiled library. However, an Android library project can also distribute an NDK-compiled library.
Assuming that “make it a library” == “make it an Android library project”, this is fine, so long as projects attempting to use your library project also have access to the other library project.