Windows 7 上的 Android NDK 环境变量
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11211600/
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
Android NDK Environment Variables on Windows 7
提问by JuiCe
I am currently trying to get the NDK up and running in Eclipse. I have read several tutorials, and found one that seems to make sense to me. However, it says:
我目前正在尝试在 Eclipse 中启动并运行 NDK。我已经阅读了几个教程,并找到了一个对我来说似乎有意义的教程。然而,它说:
Please make sure that you have set the environment variables like
JAVA_HOME -- Java Home Directory
NDK_HOME -- Android NDK Home Directory
Update Path Variable with JDK Bin folder
I am in my Environment Variables window, but am confused about what to do. I have no JAVA_HOME variable yet, so I need to create it, but with what value? The same goes with the NDK_HOME. I do have a PATH variable, which I edited earlier when I installed Cygwin.
我在我的环境变量窗口中,但对要做什么感到困惑。我还没有 JAVA_HOME 变量,所以我需要创建它,但有什么价值?NDK_HOME 也是如此。我确实有一个 PATH 变量,我之前在安装 Cygwin 时对其进行了编辑。
By the way, this is the tutorial I am using: http://www.windows7hacker.com/index.php/2010/05/how-to-addedit-environment-variables-in-windows-7/
顺便说一句,这是我正在使用的教程:http: //www.windows7hacker.com/index.php/2010/05/how-to-addit-environment-variables-in-windows-7/
采纳答案by DigCamara
I was able to generate an NDK development environment in Eclipse by using the information on the ARM site (http://ds.arm.com/ds-5-community-edition/).
通过使用 ARM 站点 ( http://ds.arm.com/ds-5-community-edition/)上的信息,我能够在 Eclipse 中生成 NDK 开发环境。
There are some caveats to using the NDK. For instance, if you installed it in a path that has spaces embedded (for example C:\program files (x86)\Android) you'll run into problems.
使用 NDK 有一些注意事项。例如,如果您将其安装在嵌入了空格的路径中(例如 C:\program files (x86)\Android),您就会遇到问题。
Try to run the ndk-build.cmd command in a command prompt to see if you have any problems with your installation.
尝试在命令提示符下运行 ndk-build.cmd 命令,看看您的安装是否有任何问题。