「建立构建环境」

  CREATED BY JENKINSBOT
硬件要求:

OS:Gingerbread(2.3.x版本)以后,要求64位环境;之前版本可以使用32位编译;
硬盘空间:代码检出100G、单个编译150G、多个编译200G+;如果使用了ccache要更多的空间;
虚拟机中:最少需要16GB of RAM/swap
软件要求:

OS:主分支是在Ubuntu LTS下开发的;

GNU/Linux、Mac OS、虚拟机中的系统
Android 6.0 (Marshmallow) – AOSP master: Ubuntu 14.04 (Trusty)
Android 2.3.x (Gingerbread) – Android 5.x (Lollipop): Ubuntu 12.04 (Precise)
Android 1.5 (Cupcake) – Android 2.2.x (Froyo): Ubuntu 10.04 (Lucid)

JDK版本:

AOSP主分支: Ubuntu – OpenJDK 8, Mac OS – jdk 8u45 or newer
Android 5.x (Lollipop) – Android 6.0 (Marshmallow): Ubuntu – OpenJDK 7, Mac OS – jdk-7u71-macosx-x64.dmg
Android 2.3.x (Gingerbread) – Android 4.4.x (KitKat): Ubuntu – Java JDK 6, Mac OS – Java JDK 6
Android 1.5 (Cupcake) – Android 2.2.x (Froyo): Ubuntu – Java JDK 5

关键的软件包:

Python 2.6 — 2.7;
GNU Make 3.81 — 3.82; Android 3.2.x (Honeycomb) 及以前的版本为了防止编译出错,需要3.82版本的make;
Git 1.7

其他的软件包:

Ubuntu 14.04 x64: 官方推荐系统

$ sudo apt-get install git-core gnupg flex bison gperf build-essential \

zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \

lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \

libgl1-mesa-dev libxml2-utils xsltproc unzip

Ubuntu 12.04: 主分支及最近的版本已不再支持此版本的系统

$ sudo apt-get install git gnupg flex bison gperf build-essential \

zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \

libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \

libgl1-mesa-dev g++-multilib mingw32 tofrodos \

python-markdown libxml2-utils xsltproc zlib1g-dev:i386

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Ubuntu 10.04 — 11.10:不再支持此版本的系统,只能又来构建旧的系统

$ sudo apt-get install git gnupg flex bison gperf build-essential \

zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \

x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \

libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \

libxml2-utils xsltproc

在Ubuntu 10.10中: $ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so

在Ubuntu 11.10中: $ sudo apt-get install libx11-dev:i386