4月 122020
编译项目时出现下面的错误:
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.
解决办法:
把项目的build.gradle中的buildscript下面dependencies里的gradle的版本升级以下就行了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
buildscript { repositories { google() maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' } jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.5.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } |
原来是:
1 |
classpath 'com.android.tools.build:gradle:3.5.3' |
Sorry, the comment form is closed at this time.