I use cmake complie opencv for android.
this is my command:
cmake -DANDROID_STL=gnustl_shared -DANDROID_NATIVE_API_LEVEL=23 -DANDROID_NDK=~/Program/android-sdk/ndk/19.2.5345600 -DANDROID_ABI=armeabi-v7a -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=./libs/armeabi-v7a -D WITH_CUDA=OFF -D WITH_MATLAB=OFF -D BUILD_ANDROID_EXAMPLES=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -DOPENCV_EXTRA_MODULES_PATH="../../opencv_contrib/modules/" -DCMAKE_INSTALL_PREFIX="../opencv/android/" ../
it throw happend error:
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".
CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
I search it and switch ndk version but not work .
cmake version : cmake version 3.16.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).