Actually, the problem is that Gradle interprets the cmake server debug output as an error and fails. This happens with com.android.tools.build:gradle:3.0.0 but works correctly starting with com.android.tools.build:gradle:3.1.0 .
If for some reason (plugin, etc.) you cannot upgrade to 3.1.0, you can replace cmake with the python shell and filter the output by removing this exact output:
[== "CMake Server" ==[ {"supportedProtocolVersions":[{"isExperimental":true,"major":1,"minor":1}],"type":"hello"} ]== "CMake Server" ==]
source share