1. 系统:buntu 10.04 64位
2.安装好 eclipse 和 JDK 1.5 之后编译 android 2.2 froyo
3.安装前最好check官网的环境准备 。
http://source.android.com/source/initializing.html
比较重要的是如下一步:
Installing required packages (Ubuntu 10.04 -- 11.10)
#########################
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 xsltproc
#########################
4. 环境配置好后
进入froyo目录
$ source build/envsetup.sh
$ make -j4
如果还有错的话,参考下面的更新,或者google
sudo apt-get update
sudo apt-get install ia32-libs
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install libncurses5-dev:i386
sudo apt-get install libc6-dev-i386
sudo apt-get install lib32z1-dev
sudo apt-get install git
sudo apt-get install g++-multilib
sudo apt-get install gperf
sudo apt-get install libx11-dev
sudo apt-get install libncurses-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install zlib1g-dev
sudo apt-get install ib64z1-dev
sudo apt-get install curl
---------
error
---------
Generating CSSPropertyNames.h <= CSSPropertyNames.in
sh: gperf: not found
sudo apt-get install gperf
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/skin/window.o] Error 1
###############################
sudo apt-get install libx11-dev
###############################
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] E
###############################
sudo apt-get install libncurses-dev
###############################