海王  

http://blog.csdn.net/junlineliu/article/details/6988233

1、初始化编译环境(ubuntu11.04 64bit)

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

$sudo apt-get install git-core 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

2、下载代码

$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
$ repo sync


3、编译代码

$ source build/envsetup.sh
$ lunch full-eng
$ make

此处有比较详细的介绍

下面介绍一下编译时可能发生的错误:

网上有人说 android4.0编译需要16G内存,简直是开玩笑

其实2G内存+5G交换分区就可以完成编译了。

硬盘最少有15G空间


详细信息:http://source.android.com/source/initializing.html

posted on 2012-03-31 14:18  海王  阅读(824)  评论(0编辑  收藏  举报