Ubuntu 12.04(64位)下载并编译 Android 4.1 源码[只有2条命令]
====================================================
[size=1em]1 [size=1em]2 [size=1em]3 [size=1em]4 [size=1em]5 [size=1em]6 | [size=1em][size=1em]$ sudo apt-get install git-core gnupg flex bison gperf build-essential \ [size=1em] zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ [size=1em] libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ [size=1em] libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \ [size=1em] python-markdown libxml2-utils xsltproc zlib1g-dev:i386 [size=1em]$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so |
Ubuntu 10.04(64位)下载并编译 Android 2.2 源码[只有11条命令]
====================================================
为了方便,我把所有操作写成了命令,按顺序(软件安装--源码下载--编译)执行成功即可:
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 ia32-libs x11proto-core-dev \libx11-dev lib32readline5-dev lib32z-dev java-common unixodbcsudo apt-get install sun-java6-jdkcdmkdir -p software/bincurl http://android.git.kernel.org/repo >software/bin/repochmod a+x software/bin/repo mkdir -p software/android/src/newcd software/android/src/newrepo init -u git://android.git.kernel.org/platform/manifest.git -b froyorepo sync make -j4如果下载的是 master 分支,在 Checkout 新分支后,往往编译不通过,会出现如
build/core/base_rules.mk:128: *** dalvik/libcore: MODULE.TARGET.JAVA_LIBRARIES.core already defined by libcore. Stop.
这样的错误,这是因为你同步下来的是最新的分支 master,该分支中可能没有之前版本需要的项目,所以需要再做以下两步:
repo init -b <branch>//比如我的:repo init -b froyorepo sync这样才得到完整的分支代码。
欢迎光临 中科因仑“3+1”工程特种兵精英论坛 (http://bbs.enlern.com/) | Powered by Discuz! X3.4 |