EDIT
I added this note to explain why I keep this question here. I added “Android” as keyword and I’d like to know whether someone else has tried to download the code and how it is possible to work around this problem.
I fear that if I ask Ubuntu they would suggest me to use OpenJDK but the question is: did someone use that SDK to build Android code?
ORIGINAL
Sometime ago I downloaded the android source code on Ubuntu 10 64bit.
I had problems but at the end I managed to get everything working.
Now I’m trying to do it again on a fresh install of the same Ubuntu version but I’m having a problem.
Although I followed the instruction here I keep having the error:
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
Googling gives you a lot of results that all give you the same solution:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
I did it but it didn’t work.
I’m running Ubuntu on a VM under VMWare.
I have also tried to add another source:
sudo add-apt-repository “deb-src http://archive.canonical.com/ubuntu lucid partner
but it didn’t help
Maybe the answer is here:
but it is weird that on the Android portal there isn’t any mention of it
The problem is that you should now download JDK manually. Somewhere I found these steps and it worked fine in my case:
chmod a+x jdk-6u<version>-linux-i586.binsudo mv jdk-6u<version>-linux-i586.bin /usr/lib/jvm/cd /usr/lib/jvmsudo ./jdk-6u<version>-linux-i586.bincan delete the .bin file now.
folder.
sudo ln -s -b /usr/lib/jvm/jdk1.6<version>/jre/bin/java/etc/alternatives/java
Append in your ~/.bashrc
Double-check the version
java -versionRemember that you can work only with JDK v6 version.