1

I want to use usb4java for my project. I'm giving dependencies for usb4java on gradle. I can import usb4java classes but when I want to run code on android device I'm getting "Native library not found in classpath: /org/usb4java/linux-armv7l/libusb4java.so".

I have compiled library for android with steps in this link;

https://github.com/libusb/libusb/tree/master/android

I created file that name is jniLibs in .../app/src/main/jniLibs. There is rebuilded libraries in armeabi, armeabi-v7a, arm64-v8a... folders. But still I'm getting this error. Please help me.

Edit:

I'm using android studio.

4

1 回答 1

0

usb4java 的默认版本似乎不支持 Android。

如文档所示:

usb4java 在 CLASSPATH 目录 org/libusb4java/-/ 中搜索库

由于这不是 Android 设备上的有效路径,因此该库将永远无法工作。您需要重建它,更新它以支持 Android。

如果可能,我建议您尝试使用Android 对 USB设备的支持。

于 2015-10-24T17:34:47.230 回答