I had set the ANDROID_NDK_HOME
as /Users/Shajilshocker/Documents/Android/NDK/android-ndk-r10b
using a mac osx application called Environment Variables.
I had confirmed that it set the path correctly in Terminal
echo $ANDROID_NDK_HOME
But when I run a shell file in a Android Studio project which invokes ndk-build
I get the following error
ndk-build: command not found
How to make sure that ndk-build is in your build path ?
How to set ndk-build in my build path ?
Thanks for any help
Well, this is actually not enough to make the system aware of the path. You must add this path to the PATH
system variable. In your case, all you have to do is to add the following line to your terminal configuration file (which should be under your home directory, named .bashrc
if you kept the default terminal, full path: ~/.bashrc
):
export PATH=$PATH:/Users/Shajilshocker/Documents/Android/NDK/android-ndk-r10b
What this line does is actually adding the path to your Android NDK directory to the PATH
variable. You export a variable named PATH
with its current content plus the directory of your NDK.
Step by step:
.bashrc
bash
, then enter)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