在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
这样就解决了上面的小问题。