android ndk 如何安装,Android NDK 安装

本文档介绍了Android NDK的安装要求和步骤,包括需要Linux、OS X或Windows操作系统,以及Android SDK的安装。NDK只能用于目标系统映像为Cupcake (1.5)或更高版本的平台。安装过程中需要GNU Make 3.81或更高版本,以及Nawk或GNU Awk。安装预编译交叉工具链二进制文件时,旧版本的配置脚本已被移除,相关检查转移到了NDK makefiles中。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 时都要进行的)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值