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?
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.
If it's 7zip format package, you can extract it with 7zip. But it is not, you can see the format from the file command. From the output result above, we can see that it's a ELF executable, so just add the executable bit and execute it. It will extract to the directory android-ndk-r10e under current directory.
You'll need to point to your NDK in your eclipse by adding the path of ndk-build to Window > preferences > android > NDK. Right click on your project folder. Choose android tools -> add native support (the bottom one) and click finish. Now it will ask for a name for your .
Add the Android SDK's sdk/tools directory and the Android NDK directory to the PATH variable. Linux: if the Android SDK is installed in /home/androiddev/adt and the Android NDK is installed in /home/androiddev/ndk the following line should be added to ~/. bashrc .
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With