ubuntu 12.10 上 android 编译环境搭建的深入解析
程序员文章站
2023-11-29 22:54:10
1. 安装所有的套件sudo apt-get install git-core gnupg flex bison gperf build-essential zip cur...
1. 安装所有的套件
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
2 . gcc 降级
sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib
sudo rm /usr/bin/gcc
sudo rm /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
3 . 安装 sun java 6
先上官网 download java http://www.oracle.com/technetwork/java/javase/downloads/ 点击打开链接
以 jdk-6u38-linux-x64.bin 为例
jdk-6u38-linux-x64.bin copy 至 home
cd ~
sudo cp jdk-6u38-linux-x64.bin /opt
cd /opt
sudo chmod a+x jdk-6u38-linux-x64.bin
sudo ./jdk-6u38-linux-x64.bin
sudo gedit ~/.bashrc &
至最后一行加上
export path=/opt/jdk1.6.0_38/bin:/opt/jdk1.6.0_38/lib:/opt/jdk1.6.0_38:$path
~/.bashrc
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
2 . gcc 降级
sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib
sudo rm /usr/bin/gcc
sudo rm /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
3 . 安装 sun java 6
先上官网 download java http://www.oracle.com/technetwork/java/javase/downloads/ 点击打开链接
以 jdk-6u38-linux-x64.bin 为例
jdk-6u38-linux-x64.bin copy 至 home
cd ~
sudo cp jdk-6u38-linux-x64.bin /opt
cd /opt
sudo chmod a+x jdk-6u38-linux-x64.bin
sudo ./jdk-6u38-linux-x64.bin
sudo gedit ~/.bashrc &
至最后一行加上
export path=/opt/jdk1.6.0_38/bin:/opt/jdk1.6.0_38/lib:/opt/jdk1.6.0_38:$path
~/.bashrc