Android Studio:与cmake服务器

时间:2017-10-29 18:23:24

标签: android-studio cmake

在Android Studio中的Gradle项目同步期间,我收到以下错误:

Error:Error occurred while communicating with CMake server. Check log C:\Users\K\AndroidStudioProjects\hi2\app\.externalNativeBuild\cmake\debug\armeabi\cmake_server_log.txt for additional information.

cmake日志说:

CMAKE SERVER: [== "CMake Server" ==[

CMAKE SERVER: {"cookie":"","inReplyTo":"configure","message":"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.","title":"Error","type":"message"}

CMAKE SERVER: ]== "CMake Server" ==]

CMAKE SERVER: 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.
CMAKE SERVER: 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.
CMAKE SERVER: 

CMAKE SERVER: [== "CMake Server" ==[

CMAKE SERVER: {"cookie":"","inReplyTo":"configure","message":"CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage","title":"Error","type":"message"}

CMAKE SERVER: ]== "CMake Server" ==]

CMAKE SERVER: CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMAKE SERVER: CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

我完全不知道问题是什么。它至少不应该是我认为的cmake版本。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

CMake表示Ninja.exe不在PATH上。

编辑:您发布的错误格式让我觉得您正在使用预发布版本的Android Studio 3.0。如果是这样,我强烈建议使用发布版本。