Error in ndk-build command on terminal (Mac)

Here is my environment variable setting in (.bashrc) ..

export ANDROID_SDK="/AndroidSDK/android-sdks" export ANDROID_NDK="/AndroidNDK/android-ndk-r8d" export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROIDNDK" 

when I try to run ndk-build on ternimal, an error message is displayed

 -bash: ndk-build: command not found 

I am just trying to create a sample example in San Angeles in the ndk directory.

+6
source share
1 answer

Since you are setting the wrong value in the PATH variable, you declared ANDROID_NDK as Environment , and in the PATH variable you add ANDROIDNDK (you are missing _ by the result.)

Change your lines as below

 export ANDROID_SDK="/AndroidSDK/android-sdks" export ANDROID_NDK="/AndroidNDK/android-ndk-r8d" export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK" 
+13
source

All Articles