eclipse NDK_ROOT 未定义。请在您的环境中定义 NDK_ROOT
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25986085/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
NDK_ROOT not defined. Please define NDK_ROOT in your environment
提问by Kirby Aster Abadilla
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".
我有一个关于 cocos2dx v3 在 Mac 上设置 android 的问题。我使用此视频 ( https://www.youtube.com/watch?v=2LI1IrRp_0w) 作为指南。在视频中一切正常,但在我自己的日食中,控制台选项卡下显示错误。这是我发现的语句错误:“python /Users/kirbyasterabadilla/Desktop/OracleEye/proj.android/build_native.py -b 释放所有未定义的 NDK_ROOT。请在您的环境中定义 NDK_ROOT”。
I also tried installing NDK plugin inside my eclipse IDE but still can't solve the problem.
我也尝试在我的 Eclipse IDE 中安装 NDK 插件,但仍然无法解决问题。
Please help me with this one. What should I do to make this error disappear?
请帮我解决这个问题。我该怎么做才能使此错误消失?
回答by jww
python /Users/kirbyasterabadilla/Desktop/OracleEye/proj.android/build_native.py -b release all NDK_ROOT not defined. Please define NDK_ROOT in your environment
python /Users/kirbyasterabadilla/Desktop/OracleEye/proj.android/build_native.py -b 释放所有未定义的 NDK_ROOT。请在您的环境中定义 NDK_ROOT
It sounds like you should export NDK_ROOT
from you log in script. Below is from my OS X 10.8.5 machine:
听起来您应该NDK_ROOT
从登录脚本中导出。以下来自我的 OS X 10.8.5 机器:
$ 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?).
据大卫·特纳在NDK通讯录,都ANDROID_NDK_ROOT
和ANDROID_SDK_ROOT
需要设置的,因为其他工具依赖于这些值(见推荐NDK目录?)。
Interestingly, Turner said nothing about ANDROID_HOME
or NDK_ROOT
(and searching the NDK group for ANDROID_HOME
returned 0 results).
有趣的是,Turner 没有提及ANDROID_HOME
or NDK_ROOT
(并在 NDK 组中搜索ANDROID_HOME
返回的 0 结果)。
After modifying ~/.bash_profile
, then perform the following (or logoff and back on):
修改后~/.bash_profile
,然后执行以下操作(或注销并重新启动):
source ~/.bash_profile
If modifying your log in script does not help, then try setting it in Eclipse:
如果修改您的登录脚本没有帮助,请尝试在 Eclipse 中进行设置:
See Setting environment variables.
请参阅设置环境变量。