I am using this question accepted answer to build nonfree module of opencv 2.4.11. i am using windows 10 operating system.
1) I moved nonfree folder from OpenCV 2.4.11\sources\modules\nonfree\
include\opencv2\ to OpenCV-2.4.11-android-sdk\sdk\native\jni\include\opencv2
2) I have created the libnonfree folder and the jni folder inside the libnonfree folder. The nonfree_init.cpp, precomp.hpp, sift.cpp and surf.cpp files are in the jni folder.
3) I have also created the Android.mk and Application.mk script files.
4) Time to build the libnonfree.so change the cmd directory into the libnonfree and type ndk-build
Here is the complete error message.
Android NDK: ERROR:Android.mk:opencv_java: LOCAL_SRC_FILES points to a missing file Android NDK: Check that C:/Users/what/Desktop/OpenCV-android-sdk-build/sdk/native/jni/../libs/arm64-v8a/libopencv_java.so exists or that its path is correct C:/Users/what/AppData/Local/Android/sdk1/ndk-bundle/build//../build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
Here is also screenshot of my files and folders
Please help i have been stuck for to days to solve this problem.
ndk-build APP_ABI=armeabi-v7a
– Lavernndk-build V=1
and post the complete build log – LavernexternalNativeBuild
via gradle? That will ignore yourAPP_ABI
setting, so you need to useabiFilters
instead. – Rickrack