Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 291
DroidEngineer Avatar asked Mar 05 '13 02:03

DroidEngineer


People also ask

How do I disable NDK?

go to Android Studio-> Tools -> SDK ManagerUnder SDK tools tab uncheck "NDK", "CMake", "LLDB" and then apply changes. NDK components will be removed.


1 Answers

Because you are supplying 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. )

Please 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"
like image 137
Jacob Avatar answered Nov 15 '22 03:11

Jacob