Android - 找不到 CMake

标签 android c++ android-ndk

我要运行 sensor-graph示例项目

在以下之后:

  1. 下载带有 NDK 包的 Android Studio 2.2+。
  2. 启动 Android Studio。
  3. 打开 android-ndk/sensor-graph 示例。
  4. 打开文件/项目结构...
  5. 点击下载或选择 NDK 位置。
  6. 点击工具/Android/同步项目与 Gradle 文件。
  7. 单击运行/运行“应用程序”。

我得到跟随错误:

Failed to find CMake.

Gradle sync failed: Failed to find CMake. Install from Android Studio under File/Settings/Appearance & Behavior/System Settings/Android SDK/SDK Tools/CMake. Expected CMake executable at /Users/myUser/Library/Android/sdk/cmake/bin/cmake. Consult IDE log for more details (Help | Show Log)

最佳答案

除了 Android NDK Bundle 之外,您还需要下载 CMake(和 LLDB)。检查 SDK 管理器以确保您拥有这些。

enter image description here

关于Android - 找不到 CMake,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40766673/

相关文章:

c++ - 如何使用 C++ 分隔带分隔符的字符串?

android - 无法将此字符串转换为 JSON

c++ - 如何为 djinni 定义 const getter?

android - JodaTime - 如何将 ISO 8601 时间字符串解析为 DateTime?

c++ - 为什么首选异步IO

java - 将字节数组从 native 代码传递到 Java 端

android - 想要使用 Android NDK 强制 wchar_t 成为一个无符号的短

android - Android 版 Swift : `ld` cannot find `-lgcc` in swift for android compilation linking step

java - 如何在android JAVA中实现带有反射的隐藏接口(interface)?

java - Java中的同态过滤