在ubuntu 15.10 上编译android 4.3.1代码。

android source 4.3.1要求make 3.8.1或者make 3.8.2以及oracle jdk 6。默认的情况下ubuntu 15.10自带的是make 4.0以及openjdk。操蛋的是即便注释掉build.mk中相关的检查,也无法顺利build。下面就写写如何在ubuntu上安装对应的make版本以及java。

碰到的error以及处理办法:

 Can't locate Switch.pm in @INC

Enter the command “cpan".
At the prompt cpan[1]>, type "install Switch".
Once completed, Type "exit".

make 3.8.2

cd ~/Downloads/
wget http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar -xvf make-3.82.tar.gz
cd make-3.82
./configure
make
sudo make install

Oracle JDK 6:(相应的,如果要安装7,把下面第三行的6换成7即可)

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

sudo update-alternatives --config javasudo update-alternatives --config javac

猜你喜欢

转载自9esuluciano.iteye.com/blog/2288790