android-studio - 安卓工作室 : error occured while communicating with cmake server

标签 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版本。有什么想法吗?

最佳答案

CMake 指示 Ninja.exe 不在 PATH 上。

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

关于android-studio - 安卓工作室 : error occured while communicating with cmake server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47003686/

相关文章:

android - 我无法访问设置中的 SDK 工具选项卡

android - 在android studio中生成sign apk时出错

gcc - 使用cmake和mingw-w64编译测试程序出错

cmake - 我可以在 CMake 中定义结构数据类型吗?

android - '错误 : Duplicate resources' after updating Google Open Source Notices to 0. 9.2

Android Studio - 配置图像资源

java - 注意:任务 ':transformClassesWithDexBuilderForDebug' 执行失败

配置时发生cmake错误

c++ - 来自文本文件的grep字符串并将其复制到CMake中的目录

visual-studio - Cmake:特定子项目只有一个配置,所有其他项目的 Debug&Release