Android NDK Installation
Android NDK 安装
Introduction:
介绍:
-------------
Please read docs/OVERVIEW.html to understand what the Android
NDK is and is not.
This file gives instructions on how to properly setup your
NDK.
请阅读 docs/OVERVIEW.html 理解 Android NDK 是什么和不是什么。
这个文件教授如何适当地安装你的 NDK。
I. Requirements:
I. 必要条件:
----------------
The Android NDK currently requires a Linux, OS X or Windows
host operating system.
Android NDK 需要一个 Linux、OS X 或者 Windows 主机操作系统。
Windows users will need to install Cygwin 1.7 or later
(http://www.cygwin.com) to
use the NDK. Note that running it under MSys or Cygwin 1.5 is
not supported.
Windows 用户使用 NDK 将需要安装 Cygwin 1.7 或更高版本(http://www.cygwin.com)
。
注意在 MSys 或 Cygwin 1.5 下运行 NDK 是不支持的。
You will need to have the Android SDK and its dependencies
installed. The NDK
cannot generate final application packages (.apk files), only
the shared library
files that can go into them.
你需要 Android SDK 和 它的依赖项已安装。
NDK 不能产生最终应用程序包(.apk 文件),只是产生可以进入最终应用程序包的共享库文件。
IMPORTANT:
重要的:
The Android NDK can only
be used to target system images using
the Cupcake (1.5) or
later releases of the platform.
Android NDK
仅可以使用在目标板系统映像使用 Cupcake(纸杯蛋糕,Android 1.5)或更新平台版本。
This is due to subtle
toolchain and ABI related changed that make
it incompatible with 1.0
and 1.1 system images.
这是由于精细的工具链和 ABI 相关的改变让
Cupcake(纸杯蛋糕,Android 1.5) 与
Android 1.0 和 1.1
系统映像不兼容。
The NDK requires GNU Make 3.81 or later being available on
your development
system. Earlier versions of GNU Make might work but have not
been tested.
NDK 需要 GNU Make 3.81 或更新版本在你的开发系统上。
更早期的 GNU Make 版本可能工作,但是没有测试过。
You can check this by running 'make -v' from the command-line.
The output
should look like:
你可以从命令行中运行 make -v 来检查,输出将看起来像:
GNU Make 3.81
Copyright (C) 2006
Free Software Foundation, Inc.
...
On certain systems, GNU Make might be available through a
different command like
'gmake' or 'gnumake'. For these systems, replace 'make' by the
appropriate command
when invoking the NDK build system as described in the
documentation. You might
also want to define the GNUMAKE environment variable to point
to it.
在某些系统上,GNU Make 可能是通过使用不相同的命令,像 gmake 或 gnumake。
对于这些系统,在这个文档中当描述调用 NDK 生成系统时更换 make 为适当的命令。
你同样可以定义 GNUMAKE 环境变量来指向它。
The NDK also requires a Nawk or GNU Awk executable being
available on your
development system. Note that the original 'awk' program
doesn't implement
the 'match' and 'substr' functions used by the NDK build
system.
NDK 同样需要一个 Nawk 或 GNU Awk 可执行文件在你的开发系统上。
注意原版的 awk 程序不能实现 match 和 substr 功能被 NDK 生成系统使用。
注:AWK 是一种用于处理文本的编程语言工具。
AWK 在很多方面类似于 Unix shell 编程语言,尽管 AWK 具有完全属于其本身的语法。
http://zh.wikipedia.org/wiki/AWK
II. Preparing your installation prebuilt cross-toolchain
binaries:
II. 准备你的安装预编译交叉工具链二进制文件:
------------------------------------------------------------------
Previous releases required you to run the
'build/host-setup.sh' script to
configure the NDK. However, this step has been removed in
release 4 (a.k.a. r4).
早期发行版需要你运行 build/host-setup.sh 脚本来配置 NDK 。
然而,在第四个发行版中这个步骤已经移除了。
The auto-detection and sanity checks that were performed by
the script have
been moved into the NDK makefiles (and are now performed each
time you invoke
GNU Make).
通过 build/host-setup.sh 脚本完成的 自动侦测 和 健全性检查 现在已经移入了 NDK makefile
文件中了。
(并且每次你调用 GNU Make 时都要进行的)