$ source build/envsetup.sh
$ lunch full-eng
這意味著,你需要編譯一個帶有所有語言,輸入法,apps,並且具備debug功能的ROM。(full代表了編譯名,eng代表了編譯類型)關於其他的編譯類型,參見下表:
Build name
Device
Notes
full
emulator
fully configured with all languages, apps, input methods
full_maguro
maguro
full
build running on Galaxy Nexus GSM/HSPA+ ("maguro")
full_panda
panda
full
build running on PandaBoard ("panda")
Buildtype
Use
user
limited access; suited for production
userdebug
like "user" but with root access and debuggability; preferred for debugging
eng
development configuration with additional debugging tools
$ make -j16
(1)依賴問題:請確保你有按照下面的步驟搭建編譯環境:
$ 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 xsltproc
On Ubuntu 10.10:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
$ sudo apt-get install libx11-dev:i386
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 \
g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown \
libxml2-utils xsltproc zlib1g-dev:i386
(2)gcc與g++版本問題:
如果你的gcc與g++版本是4.6,請按照下面的方法安裝4.4,最新的版本gcc與g++會出現編譯不過的問題。
期間若是遇到依賴問題,無法安裝gcc-4.4與g++-4.4,請先使用系統自帶的更新軟件,對整個系統進行更新,解決一些依賴問題,之後再進行操作。
更多Android相關信息見Android 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=11