在导入一个新项目的时候出现了这个错,在此记录一下
先把错误LOG贴出来:
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
A problem occurred configuring project ':app'.
> executing external native build for cmake ****\app\CMakeLists.txt
引起错误的原因就是这个CMake,之前没接触过这个东西,遇到这总问题只能在网上疯狂寻找答案,出现类似的问题的人还是有那么多的,查到的答案有以下几种:
1.删除下载好的ndk cmake LLDB 在重新下载ndk cmake LLDB
2.更换NDK
3.环境没有搭好
4.将CMAKE_MAKE_PROGRAM项后面的路径设置