I recently shifted to Android Studio from Eclipse, and I am trying to use OpenCV4Android library in my AS project. I followed the steps mentioned by TGMCians in this answer, But I am getting the following error:
Can anyone please help me resolve this? Thank you.
Error:Execution failed for task ':openCVSamplefacedetection:compileDebugNdk'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Android\android-ndk-r10\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\OF\Desktop\project\Proj\AndroidDev\workspaceAndroidStudio\face-detection\openCVSamplefacedetection\build\intermediates\ndk\debug\Android.mk APP_PLATFORM=android-11 NDK_OUT=C:\Users\OF\Desktop\project\Proj\AndroidDev\workspaceAndroidStudio\face-detection\openCVSamplefacedetection\build\intermediates\ndk\debug\obj NDK_LIBS_OUT=C:\Users\OF\Desktop\project\Proj\AndroidDev\workspaceAndroidStudio\face-detection\openCVSamplefacedetection\build\intermediates\ndk\debug\lib APP_ABI=all
Error Code:
2
Output:
C:\Users\OF\Desktop\project\Proj\AndroidDev\workspaceAndroidStudio\face-detection\openCVSamplefacedetection\src\main\jni\DetectionBasedTracker_jni.cpp:2:33: fatal error: opencv2/core/core.hpp: No such file or directory
compilation terminated.
make.exe: *** [C:\Users\OF\Desktop\project\Proj\AndroidDev\workspaceAndroidStudio\face-detection\openCVSamplefacedetection\build\intermediates\ndk\debug\obj/local/armeabi-v7a/objs/detection_based_tracker/C_\Users\OF\Desktop\project\Proj\AndroidDev\workspaceAndroidStudio\face-detection\openCVSamplefacedetection\src\main\jni\DetectionBasedTracker_jni.o] Error 1
I have also uploaded a ScreenShot.