After a couple of hours and a large effort I finally got Android to compile under Ubuntu 10.04. I thought a howto would come in handy for people in the same situation.
First you have to install Java SDK 1.5. You can find it on:
Then get the android source code. It can be found here:
After you have unpacked it you need to set your path:
$ export PATH=/path/to/jdk1.5/bin/:`echo $PATH`
Then you need to get some packets:
$ sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev lib32readline5-dev
Then you need to link libstdc++ and libz:
$ sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so $ sudo ln -s libz.so.1 libz.so
And export the ANDROID_JAVA_HOME-variable to the root of the JDK 1.5.
$ export ANDROID_JAVA_HOME=/path_to_your_jdk1.5_root/
And hopefully that’s it. Try and run ”make” in your android catalog.
The easiest was to compile Android is to run Ubuntu 9.04 inside a virtual machine and compile it from there. Ubuntu 10.x is running eglibc which, when compiling android, causes a lot of errors due to fprintf.