I am developing and android application in mac using Eclipse for android-ndk. I have already given NDK path in Eclipse. At the end when I am giving this command to build my appl
Instead of ndk-build
command, simply type ~/Desktop/AndroidNDK/android-ndk-r10d/ndk-build
in your terminal.
I didn't give any explicit values for ANDROID_NDK_ROOT and ANDROID_SDK_ROOT, i just give the location of my NDK in my eclipse preferences. Can you please guide me in this thing
According to the Android folks on the Android NDK group (see Recommended NDK Directory?), uou should always provide values for ANDROID_NDK_ROOT
, ANDROID_SDK_ROOT
and ANDROID_SDK_HOME
. Here is what they are used for:
ANDROID_NDK_ROOT
→ installation dirctory of NDKANDROID_SDK_ROOT
→ installation dirctory of SDKANDROID_SDK_HOME
→ location of SDK-related user files, defaults to ~/.android/
on Unix.Put the tools on-path and export the env vars. Here's my .bash_profile
for OS X.
$ cat ~/.bash_profile
export PS1="\h::\W$ "
# Android
export ANDROID_NDK_ROOT=/opt/android-ndk-r10d
export ANDROID_SDK_ROOT=/opt/android-sdk-macosx
export ANDROID_SDK_HOME=~/.android
export JAVA_HOME=`/usr/libexec/java_home`
export PATH="$ANDROID_SDK_ROOT/tools/":"$ANDROID_SDK_ROOT/platform-tools/":"$PATH"
Then, source your profile changes (or log-off and then log-in).