1,安装jdk-1.5, 在ubuntu 9.10上默认的是jdk1.6, 所以用 sudo apt-get install sun-java5-jdk 会提示找不到相应的软件包

解决办法: 将9.10的源替换成9.04的源

sudo -i

cd /etc/apt/

cp sources.list sources.list_bak

gedit sources.list

将该文件的内容全部替换成如下:

deb http://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiverse

deb http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse

deb http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse

deb http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse

apt-get update

apt-get install sun-java5-jdk

至此,jdk1.5就安装完成了。

收尾工作,
1),将sources.list还原回来 :

mv sources.list_bak sources.list

apt-get update

2),如果你先前安装了jdk1.6,卸载吧:

apt-get remove sun-java6-jdk sun-java6-jre sun-java6-bin

2,参照http://source.android.com/download 下载和编译源代码