原文链接:http://blog.csdn.net/yuxiangyunei/article/details/45365235
环境:
ubuntu:
ubuntu-15.04-desktop-amd64
VMware:
VMware-workstation-full-11.1.0-2496824,1F04Z-6D111-7Z029-AV0Q4-3AEH8
android:
android-5.1.0_r3
一、Initializing a Build Environment
打开终端才能输入下面的命令,打开方式:Ctrl+Alt+T
右击桌面,也可打开终端。
1.Installing the JDK
- $ sudo apt-get update
- $ sudo apt-get install openjdk-7-jdk
下面的还未测试成功
2.Config the JDK
- $ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-7-openjdk-amd64/bin/java" 1
- $ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-7-openjdk-amd64/bin/javac" 1
- $ sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/bin/java
- $ sudo update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
3.Check the JDK
- $ java -version
or
- $ sudo update-alternatives --config java
- $ sudo update-alternatives --config javac
4.Installing required packages
- $ sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
二、Building the System
1.Initialize
- $ source build/envsetup.sh
2.Choose a Target
- $ lunch 20
3.Update api
- $ make update-api
4.Build the Code
- $ make -j