SoFunction
Updated on 2025-04-09

In-depth analysis of the Android compilation environment construction on ubuntu 12.10

1. Install all the kits
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 downgrade
 
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. Install Sun Java 6
 
Go to the official website firstDownload Java /technetwork/java/javase/downloads/ Click to open the link 
Take as an example

COPY to HOME

cd ~
sudo cp /opt
cd /opt
sudo chmod a+x
sudo ./
sudo gedit ~/.bashrc &

Add to the last line
export PATH=/opt/jdk1.6.0_38/bin:/opt/jdk1.6.0_38/lib:/opt/jdk1.6.0_38:$PATH

~/.bashrc