44

I installed NDK using Android Studio (SDK Manager). Where is the default directory of NDK for Mac? How do I find the path to it?

2

3 Answers 3

45

My understanding is that now the NDK bundle is being offered via the SDK Manager within Android Studio, it will install into the Android SDK directory as per the other components (platforms, build tools, support repositories, etc.) in the SDK Manager.

You can check the location of the SDK directory itself via Android Studio -> Preferences... -> Appearance & Behavior -> System Settings -> Android SDK -> Android SDK Location field near the top of the panel.

I've customised mine (it's editable) so I'm afraid I don't know what the default is, but if you check the contents of the directory listed in that field then the NDK should be installed into a subdirectory called ndk-bundle.

4
  • 24
    it seems that default one is /Users/{username}/Library/Android/sdk/ndk-bundle
    – Lucky_girl
    Nov 10, 2016 at 7:33
  • 1
    CMD-Shift-. (dot) to show hidden folders in the Finder (~/Library is hidden)
    – Aralox
    Sep 21, 2017 at 1:18
  • 3
    If after following the instructions above, the ndk-bundle isn't in the SDK folder, you can download it by clicking on the "SDK Tools" tab in the "Android SDK" preferences pane, selecting "NDK" in the list of tools, and clicking "Apply" to download it.
    – Luciano
    Oct 28, 2019 at 4:41
  • After installing the NDK from Setting > System Setting > Android SDK > SDK Tools I am only getting a folder named ndk inside of /Users/{username}/Library/Android/sdk. There is no folder called ndk-bundle is /Users/{username}/Library/Android/sdk/ndk the NDK path ?? Dec 9, 2022 at 7:24
9

You can find it on $ANDROID_SDK_PATH/ndk-bundle.
ANDROID_SDK_PATH is your SDK path which I suppose you have set it already.

1
  • 2
    Instead of ndk-bundle now it is just ndk --> /Users/{username}/Library/Android/sdk/ndk
    – charman
    May 25 at 21:32
2

Finding your SDK/NDK library path needs information about how you installed them. However, there are two possible solutions to find them

  1. Using Android Studio: the possible way to find is using Android Studio. Open your Android Studio Preference (or "File->Settings") > Appearance & Behavior > System Settings > Android SDK. You can find the path to your SDK and NDK, which is in the same directory.
  2. Using Terminal: Open Terminal and put the command as below. Hopefully, if ANDROID_HOME environment has been set.

    echo $ANDROID_HOME

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.