Troubles in Building Android Source Code

Some Troubles or problems you may encounter while you setup the Android source code build environment on Ubutun 12.4.4

1. Install Sun-jdk1.6

prompt:

$ sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package sun-java6-jdk has no installation candidate

Soltuion:

reference to this blog, especially the last part:

1.Download jdk-6u38-linux-x64.bin
http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html
 
2. 設為可執行檔
chmod +x jdk-6u38-linux-x64.bin
3. 解開
./jdk-6u32-linux-x64.bin
4.建立jvm資料夾
sudo mkdir /usr/lib/jvm
5.移至jvm資料夾
sudo mv jdk1.6.0_38 /usr/lib/jvm/jdk1.6.0_38
6.設定環境變數吧(還是替換)
sudo update-alternatives –-install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 1
sudo update-alternatives –-install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 1
sudo update-alternatives –-install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 1
 
sudo update-alternatives –-config javac

sudo update-alternatives –-config javaws
sudo update-alternatives –-config java

 

Troubles in Building Android Source Code,,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。