只要是so编译有问题,都是报这个错误。
- 揭示错误
Execution failed for task ':libusb4javajni:ndkBuild'. > Process 'command 'D:\SOFTWARES\DEVELOP\android-ndk-r16b/ndk-build.cmd'' finished with non-zero exit value 2 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- 自行编译查看具体错误
D:\Nanjing-SVN\UsbCamera-BulkTransfer\libusb4javajni\src\main\jni\libusb4java>D: \SOFTWARES\DEVELOP\android-ndk-r16b/ndk-build.cmd Android NDK: WARNING: APP_PLATFORM android-14 is higher than android:minSdkVersi on 1 in D:/Nanjing-SVN/UsbCamera-BulkTransfer/libusb4javajni/src/main/AndroidMan ifest.xml. NDK binaries will *not* be comptible with devices older than android- 14. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_ problems.md for more information. D:/SOFTWARES/DEVELOP/android-ndk-r16b/build//../build/core/setup-app.mk:81: Andr oid NDK: Application targets deprecated ABI(s): armeabi D:/SOFTWARES/DEVELOP/android-ndk-r16b/build//../build/core/setup-app.mk:82: Andr oid NDK: Support for these ABIs will be removed in a future NDK release. D:/Nanjing-SVN/UsbCamera-BulkTransfer/libusb4javajni/src/main/jni/Android.mk:7: D:/Nanjing-SVN/UsbCamera-BulkTransfer/libusb4javajni/src/main/jni/libuvc/android /jni/Android.mk: No such file or directory D:/Nanjing-SVN/UsbCamera-BulkTransfer/libusb4javajni/src/main/jni/Android.mk:7: D:/Nanjing-SVN/UsbCamera-BulkTransfer/libusb4javajni/src/main/jni/libuvc/android /jni/Android.mk: No such file or directory make: *** No rule to make target `D:/Nanjing-SVN/UsbCamera-BulkTransfer/libusb4j avajni/src/main/jni/libuvc/android/jni/Android.mk'. Stop.
想办法解决即可。