未定义NDK_ROOT.请在您的环境中定义NDK_ROOT [英] NDK_ROOT not defined. Please define NDK_ROOT in your environment
问题描述
我对在Mac上设置android的cocos2dx v3有问题.我使用这部影片(.
I have a problem regarding to cocos2dx v3 setting up android on mac. I use this video (https://www.youtube.com/watch?v=2LI1IrRp_0w) as a guide. In the video everything is doing fine but on my own eclipse, there's an error that shows up under my console tab. This is the statement error that I found : "python /Users/kirbyasterabadilla/Desktop/OracleEye/proj.android/build_native.py -b release all NDK_ROOT not defined. Please define NDK_ROOT in your environment".
I also tried installing NDK plugin inside my eclipse IDE but still can't solve the problem.
Please help me with this one. What should I do to make this error disappear?
python /Users/kirbyasterabadilla/Desktop/OracleEye/proj.android/build_native.py -b release all NDK_ROOT not defined. Please define NDK_ROOT in your environment
It sounds like you should export NDK_ROOT
from you log in script. Below is from my OS X 10.8.5 machine:
$ cat ~/.bash_profile
# MacPorts Installer addition on 2012-07-19 at 20:21:05
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Android
export ANDROID_NDK_ROOT=/opt/android-ndk-r9
export ANDROID_SDK_ROOT=/opt/android-sdk
export JAVA_HOME=`/usr/libexec/java_home`
export ANDROID_HOME="~/.android"
export NDK_ROOT="$ANDROID_NDK_ROOT"
export PATH="$ANDROID_SDK_ROOT/tools/":"$ANDROID_SDK_ROOT/platform-tools/":"$PATH"
According to David Turner on the NDK Mailing List, both ANDROID_NDK_ROOT
and ANDROID_SDK_ROOT
need to be set because other tools depend on those values (see Recommended NDK Directory?).
Interestingly, Turner said nothing about ANDROID_HOME
or NDK_ROOT
(and searching the NDK group for ANDROID_HOME
returned 0 results).
After modifying ~/.bash_profile
, then perform the following (or logoff and back on):
source ~/.bash_profile
If modifying your log in script does not help, then try setting it in Eclipse:
See Setting environment variables.
这篇关于未定义NDK_ROOT.请在您的环境中定义NDK_ROOT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!