AICamera
AICamera copied to clipboard
Error occurred while communicating with CMake server.
NDK r16b Gradle 4.1 Cmake 3.10 MacOS 10.14.2 Android studio 3.2.1
When I build the project, get error
Error occurred while communicating with CMake server.
Searched all related problems and did not fix it.
I got the same issue. I downgrade the CMake to 3.6 and it works for me.
Actually the issue is that Gradle is interpreting the debug output of the cmake-server as an error and fails. It happens with com.android.tools.build:gradle:3.0.1 but it works correctly starting with com.android.tools.build:gradle:3.1.0.
It works for me:
/// (1) build.gradle file
diff --git a/build.gradle b/build.gradle
index 5120095..d17925d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.0.1'
+ classpath 'com.android.tools.build:gradle:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
/// (2) gradle/wrapper/gradle-wrapper.properties file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index c18d9e9..c14b620 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue Mar 06 19:43:14 PST 2018
+#Thu Feb 14 18:28:03 EST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
The trick mentioned by @pedrodiamel removes the above mentioned CMake error. However now the Android Studio runs into a new error:
External Native Build Issues:
SIMPLE: Error configuring
whatever this means ...
(Im using Android Studio 3.4.1 and downloaded and linked android-ndk-r17c-linux-x86_64
in local.properties
as described in different issues.)
*UPDATE: The latter problem can be fixed with this trick:
- Step 1: Open build.gradle
- Step 2: Delete this portion of code from the file and rebuild the project
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
}
}