ubuntu 12.04 下安装android编译环境

1. 下载安装ubuntu系统,安装的是 ubuntu-12.04.4-dvd-amd64.so

     下载链接为: http://cdimage.ubuntu.com/releases/12.04/release/ubuntu-12.04.4-dvd-amd64.iso

2. 安装需要的软件包

    sudo apt-get install -y 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 g++-multilib mingw32 tofrodos libgl1-mesa-dev python-markdown libxml2-utils xsltproc zlib1g-dev:i386

    sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

3. 下载 JDK1.6 并安装

    (1). 下载地址为: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR

    (2). 安装 JDK1.6

          sudo chmod a+x jdk-6u45-linux-x64.bin

          ./jdk-6u45-linux-x64.bin

          sudo cp -rf jdk1.6.0_45 /usr/lib/jvm

4. 配置JAVA环境变量

    (1). sudo gedit /etc/environment, 加上以下2句

           CLASSPATH=/usr/lib/jvm/jdk1.6.0_45/bin
           JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45

    (2). sudo gedit /etc/profile, 加上以下3句

           JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45                                       
           export  CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH                               
           export  PATH=$JAVA_HOME/bin:$PATH

    重启系统后完成。


     


你可能感兴趣的:(android)