Ubuntu 13.10 Android KK Initializing a Build Environment

安装Java 6以支持旧版Android开发
本文档详细介绍了如何在Ubuntu上安装Java 6,并提供了具体的步骤来确保安装正确无误。这对于需要支持从Cupcake到KitKat等旧版Android系统的开发者尤为重要。

You can follow android guide, and need other work also.


https://source.android.com/source/initializing.html


1. Install java6

 Please dont use openjdk, please remove openjdk at first

$  sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

2.  add source list for apt

sudo add-apt-repository "deb http://ppa.launchpad.net/ferramroberto/java/ubuntu natty main" & sudo apt-get update
3.  add source list partner
sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner" & sudo apt-get update

4.  install  java6-jre

$ sudo apt-get install sun-java6-jre sun-java6-plugin
5.  Install  java6-jdk
$ sudo apt-get install sun-java6-jdk sun-java6-plugin

6.  Check the java version
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)

Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)


7. Optionally, update the default Java version by running:

$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac


If you encounter version errors for Java, set itspath as described in the WrongJava Version section.

To develop older versions of Android, download and install the corresponding version of the Java JDK:
Java 6: for Gingerbread through KitKat
Java 5: for Cupcake through Froyo




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值