Reputation: 51069
It is said, that it is possible to install NDK with Android SDK manager with the following picture:
Unfortunately, I don't have SDK Plantforms
, SDK Tools
and SDK Update Sites
tabs in my SDK Manager. My picture is following:
So how to install NDK in my situation?
Upvotes: 7
Views: 32755
Reputation: 590
There is two ways to install NDK with sdkmanager
from command line:
Preferred method (will install specific NDK version at sdk/ndk/[version])
sdkmanager "ndk;26.1.10909125"
Legacy method (will install older NDK version [22.1.7171670] at sdk/ndk-bundle)
sdkmanager "ndk-bundle"
Second method seems obsolete and not documented, but might be useful for some old projects.
Upvotes: 3
Reputation: 170
If your internet connection is using a proxy, which is most often the case for office networks, the https connection to the Android repo does not work sometimes. As a result you will not see the NDK in the list. If that is the case, copy the https repo link and add the same repo with http, as shown on the picture.
The "Custom Update Site" is the link that manually added repo link. Notice the change from https to http.
Upvotes: 2
Reputation: 117328
Since you are using the standalone Android SDK Manager, you'll need to use the sdkmanager command line tool.
cd
"path to your installation of Android SDK Manager"\tools\bin
sdkmanager ndk-bundle
done
, start Android SDK ManagerUpvotes: 16
Reputation: 2418
@ortisenderos has the right options available to you.
If you're not going to utilize the common setups in android studio and/or eclipse you can expect to place the paths to all your tools into your PATH environment variable, (be it Linux, macOS or Windows).
[Path to CMake]/bin
[Path to Git]/bin
[Path to SDK]/tools
[Path to SDK]/platform-tools
[Path to NDK]
[Path to ANT]/bin
etc...
Upvotes: 1
Reputation: 370
The android's standalone sdk manager [second picture] differs from the one integrated in Android Studio[first picture]. The standalone has the basics for android developing whereas the Android Studio's integrated sdk manager, located in Tools > Android > SDK Manager, adds more useful tools, such as the ndk, Cmake* and LLDB* [* in android studio 222 version] (the ones highlighted).
So you have two options, if you are using Android Studio, using the integrated sdk manager to directly install the ndk or you could manually download the ndk and add the path to your system variables so your build environment is aware of it.
Upvotes: 3