macos Mac OSX 上的 Android NDK - 无需开发人员工具即可快速安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4454653/
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 on Mac OSX - quick install w/o Developer Tools
提问by wajiw
I was just suggested to port some signal processing code to use the Android NDK to speed up the process, but I'm wondering 1. where to install it to and 2. what tool-chain to use
有人建议我移植一些信号处理代码以使用 Android NDK 来加快进程,但我想知道 1. 将它安装到哪里以及 2. 要使用什么工具链
I'd prefer not downloadingthe 3.5GB Mac Developer Tools if possible. I don't have access to an install cd that has it. Want to try and get this done asap. Does anyone know a way to get NDK development running quickly on OSX(snow leopard)?
如果可能,我不想下载3.5GB Mac 开发者工具。我无权访问包含它的安装 cd。想尽快完成这项工作。有谁知道在 OSX(雪豹)上快速运行 NDK 开发的方法吗?
回答by Bellinghammer
A version of make is included with the Android NDK. Simply add {NDK install dir}/prebuilt/darwin-x86/bin
to your PATH
and you'll be able to build with the NDK.
Android NDK 中包含一个 make 版本。只需添加{NDK install dir}/prebuilt/darwin-x86/bin
到您的PATH
,您就可以使用 NDK 进行构建。
回答by Julio Gorgé
Unzip the NDK package for Mac OS X anywhere, then add it to your path. That's all you need to build code with the NDK. The NDK includes its own GCC-based toolchain, so you don't even need to have Xcode installed.
将适用于 Mac OS X 的 NDK 包解压缩到任何位置,然后将其添加到您的路径中。这就是使用 NDK 构建代码所需的全部内容。NDK 包括其自己的基于 GCC 的工具链,因此您甚至不需要安装 Xcode。
Go to the samples in the NDK and type ndk-build in the console to build them.
转到 NDK 中的示例并在控制台中键入 ndk-build 以构建它们。