在 ubuntu 11.10 中build android 源码

在build  android ICS (android 4.0 的源码的时候发现的一些问题)

1. 在配置build 环境的过程中,参考 source.android.com 上的步骤的时候,出现了一些小问题。

按照官网上的提示:

Installing the JDK

The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" $ sudo apt-get update $ sudo apt-get install sun-java6-jdk

但是事情总是不尽如人意,出现什么  sun-java6-jdk  has no candidate package 这样的提示, 后来反复多试了几次发现还是不行。。


后来找到的解决方法:

1.可以先将jdk 1.5 安装上然后在执行安装(更新到1.6 就可以了) 。。。

具体步骤:

$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk

 

然后在反过来安装jdk 1.6 :

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

 

这样就解决了上面的小问题。

 



转载于:https://my.oschina.net/totemzl/blog/49989

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值