我正在构建一个项目,需要一些 NDK 代码,但是有一个问题让我疯狂了几天。
这只是一个使用 NDK 创建的空项目,按照 AS 指南创建,并且没有做任何更改。
环境:
- Android Studio 3.2.1
- Build #AI-181.5540.7.32.5056338,创建于2018年10月9日
- JRE:1.8.0_152-release-1136-b06 amd64
- JVM:由 JetBrains s.r.o 开发的 OpenJDK 64 位服务器虚拟机
- Windows 10 10.0
- CMake 版本 3.10.2.4988404(由 SDK 管理器下载)
以下是提示:
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...但这些答案都无效。