This tutorial describes how you can set up an development environment for building Android apps on an Ubuntu 11.04 desktop using Eclipse, the Android SDK, and PhoneGap. I will describe how to build Android apps from the command line with PhoneGap and from the GUI with Eclipse and PhoneGap and how to test them in an Android emulator and on a real Android device. PhoneGap allows you to develop your Android applications using web technologies such as HTML, CSS, and JavaScript (e.g. with JavaScript libraries such as jQuery/jQTouch), and it will turn these web apps into native Android apps (in fact, PhoneGap supports multiple platforms such as Android, iPhone, Palm, Windows Mobile, Symbian, so you can use the same sources to create apps for multiple platforms).

I do not issue any guarantee that this will work for you!

1 Preliminary Note

I will not explain how to develop an Android app using HTML, CSS, and JavaScript. You can find lots of tutorials about this on the Internet, e.g. this one:

If you are on a 64bit system, you also need to install the following two packages:

sudo apt-get install lib32stdc++6 ia32-libs

3 Installing The Android SDK

Open Firefox and go to http://developer.android.com/sdk/index.html. There you will find links for the Android SDK for the different platforms (Windows, Mac OS X, Linux). Copy the link location of the download for Linux (i386) (don't worry, this download works on both i386 and x86_64 platforms!)...

This will give you the directory android-sdk-linux_x86 in your home directory ($HOME). We must add the $HOME/android-sdk-linux_x86/tools directory and the $HOME/android-sdk-linux_x86/platform-tools directory to our PATH variable which we do as follows: