hidapi icon indicating copy to clipboard operation
hidapi copied to clipboard

Android Won't Compile Detail error below

Open Rathna-K opened this issue 7 years ago • 5 comments

when I compile the Android.MK inside jni using NDK under windows, I am getting this error: Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14. D:/adt-bundle-windows-x86_64-20140702/android-ndk-r16b/build//../build/core/build-binary.mk:693: Android NDK: Module hidapi depends on undefined modules: usb1.0 D:/adt-bundle-windows-x86_64-20140702/android-ndk-r16b/build//../build/core/build-binary.mk:693: Android NDK: Module hidapi depends on undefined modules: usb1.0 D:/adt-bundle-windows-x86_64-20140702/android-ndk-r16b/build//../build/core/build-binary.mk:693: Android NDK: Module hidapi depends on undefined modules: usb1.0 D:/adt-bundle-windows-x86_64-20140702/android-ndk-r16b/build//../build/core/build-binary.mk:693: Android NDK: Module hidapi depends on undefined modules: usb1.0 [arm64-v8a] Compile : hidapi <= hid.c hidapi-master/android/jni/../../libusb/hid.c:47:10: fatal error: 'libusb.h' file not found #include <libusb.h> ^~~~~~~~~~ 1 error generated. make: *** [hidapi-master/android/obj/local/arm64-v8a/objs/hidapi/__/__/libusb/hid.o] Error 1

Rathna-K avatar Mar 25 '18 18:03 Rathna-K

Any update of this issue? I've been facing the same problem.

chiawei-liu avatar Aug 04 '18 03:08 chiawei-liu

I will admit I am also stumped as to where to put the libusb1.0 files that had been built using it's JNI system. I wonder if anyone will ever add a README to the android folder

cnlohr avatar Aug 23 '19 08:08 cnlohr

I will admit I am also stumped as to where to put the libusb1.0 files that had been built using it's JNI system. I wonder if anyone will ever add a README to the android folder

You can put wherever you want it. Just add LIBDIR to project and that will sort things out

malbit avatar Aug 26 '19 14:08 malbit

@cnlohr @malbit sorry, are you saying you were able to compile it successfully ? If i remember, the problem was it wont compile successfully.

Rathna-K avatar Aug 26 '19 17:08 Rathna-K

Error above says there is ANDROID_NDK not set. Download NDK end export path to it and it should work. I am using Ubuntu Docker to build android libs and never had problems with it

malbit avatar Aug 26 '19 19:08 malbit