Before you download and build the Android source, ensure your
system meets the following requirements:
下载和编译安卓源代码之前,确保你的系统满足以下要求
A Linux or Mac system. It is also
possible to build Android in a virtual machine on unsupported
systems such as Windows. If you are running Linux in a virtual
machine, you need at least 16GB of RAM/swap and 30GB or more of
disk space in order to build the Android tree.
Linux或Mac系统。也可以在windows系统下使用虚拟机来编译。如果使用虚拟机安装Linux系统,必须要有至少16g的RAM|swap和30g的硬盘
A 64-bit environment is required
for Gingerbread (2.3.x) and newer versions, including the master
branch. You can compile older versions on 32-bit systems.
2.3以上安卓版本只能在64机上编译,32位的机器只能编译老版本
30GB of free disk space to complete
a single build and up to 100GB or more for a full set of builds.
The source download is approximately 8.5GB in size.
30g的硬盘只够编译一个安卓版本,如果想编译所有的安卓版本需100g的硬盘,单单是代码就有8.5g
Python 2.6 -- 2.7, which you can
download frompython.org.
需安装Python2.6-2.7
GNU Make 3.81 -- 3.82, which you
can download fromgnu.org,
需安装Make3.81-3.82
JDK 7 to build the master branch of
Android in theAndroid Open Source Project
(AOSP); JDK 6 to build Gingerbread through KitKat; JDK 5 for
Cupcake through Froyo. SeeInitializing a
Build Environmentfor
installation instructions by operating system.
编译不同的安卓版本需不同的jdk版本,jdk7可以编译所有的安卓版本,jdk6可以编译gingerbread,jdk5可以编译cupcake
Git 1.7 or newer. You can find it
atgit-scm.com.
需git1.7以上版本