-------------

英文文档见android-ndk-r5b的documentation.html

属于Android Native Development Kit (NDK)的一部分

见http://developer.android.com/sdk/ndk/(需要代理)

翻译仅个人见解

-----------------

 

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:

 

一、系统需要:

----------------

 

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用户将需要安装Cygwin 1.7或更新(http://www.cygwin.com)以使用NDK。注意不支持在MSys或Cygwin 1.5下运行它。

 

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(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相关的微妙改变致使其不兼容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程序没有实现NDK构建系统使用的match和substr函数。

 

II. Preparing your installation prebuilt cross-toolchain binaries:

 

二、准备你的预构建交叉工具链二进制文件的安装:

------------------------------------------------------------------

 

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。然而,这个步骤已经在发布版4(即r4)被移除。

 

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).

 

执行自动检测和合理性检查的脚本已经被引入到NDK makefile(现在每当你调用GNU Make时都会执行它)。

posted on 2011-11-02 12:07  一个人的天空@  阅读(463)  评论(0编辑  收藏  举报