简体   繁体   中英

How can I install Android NDK Cmake tools on headless server

I'm trying to configure an headless build-server to build an Android NDK project that's using Cmake to build the C++ part.

Right now I'm having this issue:

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find CMake.
  Install from Android Studio under File/Settings/Appearance & Behavior/System Settings/Android SDK/SDK Tools/CMake.
  Expected CMake executable at /usr/local/android-sdk-linux/cmake/bin/cmake.

I've found a workaround!!

I've install cmake using this script: https://github.com/Commit451/android-cmake-installer

It's done the job until Google publish a fix so we can install it using the Sdk Manager ( here link of the issue

Google已为此(从25.2.3版本开始)在SDK中添加了一个新工具: sdkmanager

The SDK manager can be used from the command line: http://tools.android.com/recent/updatingsdkfromcommand-line

One thing to note though is that that's actually a rather old version of the SDK manager and it's fed from a different set of data, ie the packages available in the standalone SDK manager will not necessarily match those in the Studio SDK manager.

I'm running into the same issue myself. AFAIK, the only way you can install the Android CMake is through Android Studio since the command line tools don't include CMake when you run: android list sdk --all (version r24.4.1)

As a workaround, you can just package the SDK with CMake and download them to your server until CMake becomes available via the Android CLI tools.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM