Ubuntu12.04设置android4.2编译环境
1、安装Ubuntu12.04系统
2、apt-get update
3、apt-get upgrade
4、安装java6(http://www.cnblogs.com/bulaye/p/3364794.html)
5、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
安装libgl1-mesa-glx:i386
会提示安装依赖包libglapi-mesa:i386
6、源码下载或复制(略去repo)
7、源码目录下执行
source build/envsetup.sh
lunch full-eng
make -j4
8、eclipse中导入代码 (http://source.android.com/source/using-eclipse.html)
cd 源码目
cp development/ide/eclipse/.classpath .
chmod u+w .classpath
修改eclipse中eclipse.ini
-Xms128m
-Xmx512m
-XX:MaxPermSize=256m
-
If Eclipse asks you for a workspace location, choose the default.
-
If you have a "Welcome" screen, close it to reveal the Java perspective.
-
File > New > Java Project
-
Pick a project name, "android" or anything you like.
-
Select "Create project from existing source", enter the path to your Android root directory, and click Finish.
-
Wait while it sets up the project. (You'll see a subtle progress meter in the lower right corner.)