I got the following error on Eclipse using Ubuntu 8.04
Error generating final archive: null
In this case, some Java tools such as java, javac and keytool may be mixed. Actually my system has been installed some java versions, java-gcj, java-1.5.0-sun and java-6-sun, and some were java6 and others were gcj.
To make sure what kind of java version are installed, run the following command.
sudo update-java-alternatives -l
And -s option can set all java tools correctly.
sudo update-java-alternatives -s java-6-sun
And then remove ~/.android directory and execute eclipse.