DroidEngineer DroidEngineer - 3 months ago 22
Android Question

Error in ndk-build command on terminal (Mac)

Here comes 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 it display error message saying

-bash: ndk-build: command not found


i am just try to build San Angeles sample example in ndk directory.

Answer

Because you are supply wrong value in PATH variable, you have declared ANDROID_NDK as Environment, and in PATH variable you are adding ANDROIDNDK ( you are missing _ under score. )

edit 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"
Comments