문제 설명
CMake가 서버에 통신 오류가 발생했습니다. (CMake communicate to server error occurred)
저는 NDK 코드가 필요한 프로젝트를 만들고 있는데, 여기에 문제가 있습니다. 요 며칠간 저를 미치게 만들었습니다.
AS 가이드에 따라 생성하고 변경한 NDK를 사용하여 빈 프로젝트일 뿐입니다. 아무것도 없습니다.
환경:
- Android Studio 3.2.1
- 빌드 #AI‑181.5540.7.32.5056338, 10월 9일 빌드 , 2018
- JRE: 1.8.0_152‑release‑1136‑b06 amd64
- JVM: JetBrains sro의 OpenJDK 64비트 서버 VM
- Windows 10 10.0
- CMake 버전 3.10.2.4988404(SDK Manager에서 다운로드)
다음은 힌트입니다.
Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report‑bugs.html
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.
Support for CMake 3.7 and higher is a preview feature. To report a bug, see https://developer.android.com/studio/report‑bugs.html
[== "CMake Server" ==[
{"supportedProtocolVersions":[{"isExperimental":true,"major":1,"minor":1}],"type":"hello"}
]== "CMake Server" ==]
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Error occurred while communicating with CMake server. Check log C:\Users\xxx\Desktop\MyApplication\app\.externalNativeBuild\cmake\debug\armeabi‑v7a\cmake_server_log.txt for additional information.
* Try:
Run with ‑‑stacktrace option to get the stack trace. Run with ‑‑info or ‑‑debug option to get more log output. Run with ‑‑scan to get full insights.
* Get more help at https://help.gradle.org
CONFIGURE FAILED in 7s
Error occurred while communicating with CMake server. Check log C:\Users\xxx\Desktop\MyApplication\app\.externalNativeBuild\cmake\debug\armeabi‑v7a\cmake_server_log.txt for additional information.
이미 모든 게시물을 확인했습니다. 이 사이트와 다른 많은 사이트.AS/SDK/NDK/gradle/tools를 다시 설치하려고 했습니다... 해당 답변이 작동하지 않습니다.
참조 솔루션
방법 1:
I did something similar as Oliver.Wong, and it worked for me. I uninstalled Cmake directly from AndroidStudio (my version was 3.10.xx). And then I installed Cmake 3.6xx from the command line ("yourSdkPath"/android‑sdk/tools/bin/sdkmanager/ "cmake;3.6.4111459")
방법 2:
Try below
externalNativeBuild {
cmake {
...
version "3.10.2"
...
}
}
Or just remove the newer version of CMake 3.10.2, and fallback to 3.6.
방법 3:
Please see if this one could help. For this case, please try use Studio/gradle plugin version 3.3.1+.
(by Oliver.Wong、Marc Calandro、shizhen、Gerry)