Make在为android构建openCV时找不到android NDK-如何设置?
我正在尝试为android构建opencv。我快做完了,整个图书馆都建好了。在主构建之后,我遇到了关于缺少JRE路径和Android SDK路径的消息,但在这两种情况下,Make都告诉我需要设置什么环境变量。但是现在它找不到Android NDK,我也不知道如何将它指向正确的文件夹 以下是错误:Make在为android构建openCV时找不到android NDK-如何设置?,android,c++,opencv,cmake,android-ndk,Android,C++,Opencv,Cmake,Android Ndk,我正在尝试为android构建opencv。我快做完了,整个图书馆都建好了。在主构建之后,我遇到了关于缺少JRE路径和Android SDK路径的消息,但在这两种情况下,Make都告诉我需要设置什么环境变量。但是现在它找不到Android NDK,我也不知道如何将它指向正确的文件夹 以下是错误: Override build ABIs for the project face-detection Override lintOptions for the project face-detectio
Override build ABIs for the project face-detection
Override lintOptions for the project face-detection
Override doNotStrip-debug for the project face-detection
Parsing the SDK, no caching allowed
SDK initialized in 0 ms
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':face-detection'.
> NDK not configured.
Download it with SDK manager.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 52s
VCS Checkout Cache (D:\programming\lib\openCV\opencv\build_clang_64_qt_android_armeabi_v7a\opencv_android\.gradle\vcsWorkingDirs) has not been cleaned up in 0 days
make[2]: *** [opencv_android/opencv/build/outputs/aar/opencv-release.aar] Error 1
make[1]: *** [modules/java/android_sdk/CMakeFiles/opencv_java_android.dir/all] Error 2
make: *** [all] Error 2
回答你的问题了吗?尝试在
samples/build.gradle
中设置classpath'com.android.tools.build:gradle:4.0.0'。