我最近从Eclipse转移到Android Studio,我正在尝试在我的AS项目中使用OpenCV4Android库。我按照TGMCians in this answer提到的步骤操作,但我收到以下错误:
任何人都可以帮我解决这个问题吗?谢谢。
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
我还上传了ScreenShot.