ubuntu12.04(VirtualBox) 64-bit build android source

1.download VirtalBox(VirtualBox-4.1.14.exe) and Ubuntu12.04(ubuntu-12.04-desktop-amd64.iso)
http://releases.ubuntu.com/12.04/ubuntu-12.04-desktop-amd64.iso

2.install VirtalBox,New a VM and loader the iso image to create Ubuntu 64-bit

3.apt-get update

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

but when I input the comont above,I see the error which is "E: Package 'sun-java6-jdk' has no installation candidate"

so I deside to install the jdk by myself,so download the jdk and install myself

cd /media/sf_Ubuntu_Software/
cp jdk-6u24-linux-i586.bin /home/jftt/workspace/
sudo chmod 777 jdk-6u24-linux-i586.bin
./jdk-6u24-linux-i586.bin

jftt@jftt-pc:~/workspace/jdk1.6.0_24$ pwd
/home/jftt/workspace/jdk1.6.0_24

jftt@jftt-pc:~/workspace/jdk1.6.0_24$ sudo gedit /etc/profile

export JAVA_HOME=/home/jftt/workspace/jdk1.6.0_24
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH:$JRE_HOME/bin

jftt@jftt-pc:~/workspace/jdk1.6.0_24$ cd /etc/
jftt@jftt-pc:/etc$ source ./profile
jftt@jftt-pc:/etc$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

4.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 lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev gcc-multilib g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc

apt-get commond download the sofeware saved in the folder /var/cache/apt/archives,you can backup the sofeware(*.deb)

android-4.0.1_r1.

5.repo init -u https://android.googlesource.com/a/platform/manifest -b android-4.0.1_r1

6.repo sync

7.source build/envsetup.sh
lunch
1
make -j4
emulator
 

你可能感兴趣的:(VirtualBox)