Make sure that you have the 32bit compatibility libraries installed if you are using 64bit Ubuntu
- Install the JDK
- Download and install Eclipse
- Download and install the Android SDK
- Install the ADT Plugin in Eclipse
- Install Additional Android Developer Components
- Setting up your PATH variable (Optional)
- Creating an AVD
- Start Programming!
If you fail to install the 32bit compatibility libraries you will get an 'adb version' error at the end when you run Eclipse. If you are running 64bit Ubuntu, start out by installing the 32bit libraries
~$ sudo apt-get install ia32-libs
This should be a straight forward step
~$ sudo apt-get install openjdk-6-jdk
Find and download an appropriate version of Eclipse. Since my last instructions for 11.04, the version of Eclipse in the Ubuntu repositories has jumped to 3.7. Hooray! Go ahead and install Eclipse
~$ sudo apt-get install eclipse
Following the instructions here, which include a download link, install the SDK. You can download it with this command
~$ wget http://dl.google.com/android/android-sdk_r16-linux.tgz
Next, untar the package
~$ tar -xvzf android-sdk_r16-linux.tgz
You will need to remember where these files ended up when you install the ADT plugin for Eclipse. If you followed these instructions, you should have extracted the files to
The next next step historically posed me the most problems. This time proved no different. Rather than plagiarize the steps, just look here for the instructions. To summarize the steps, you must open Eclipse, add the ADT plugin location, and install the ADT plugin within Eclipse. Once installed, you must point Eclipse to the location of the Android SDK folder, previously installed.
If you get the following error during the install
Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) Missing requirement: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be foundthen try running Eclipse as root.
~$ sudo eclipse
and try again. This did the trick for me. It seems to be a problem on 64 bit Ubuntu with Eclipse v3.7
Now, in a terminal, and go to the
android-sdk-linux_x86/tools/ directory and run the Android program to open the Android SDK and AVD manager.
~$ cd ~/android-sdk-linux/tools/
You should get a window like this
Select 'Available packages' on the left. Next, select the components that you want. Google provided a list of suggested components here. Once you have selected the packages that you want, click the 'Install selected' button on the bottom right. Depending on what you select, it may need to download several hundred mb. This can take awhile. You can find more information on using the SDK and AVD manager here.
In Ubuntu, you want to open your .bashrc file. A simple
~$ gedit ~/.bashrc
will open the file. Next, add the following line to the end of .bashrc
(path-to-sdk) with the path to where you installed the sdk. If you followed this tutorial, it will probably be in your home directory.
If you've made it this far, before you dive into your 'Hello World' application, you need to create an AVD, or Android Virtual Device.
If all went well, you are ready to start developing an app for Android!
The official Android SDK instructions say you might have to fiddle with the USB settings to get your physical hardware to play nicely with the debugger. All I had to do was to enable USB Debugging under application settings on the Android device and I was on my way. That was a nice surprise.
This time around, installing the SDK went smoothly. I think the SDK and Ubuntu showed some maturity in the ease of installing the SDK. Last year I had to fight a little with things just to get anything to work.
Was this helpful?
Did this work for you? Were you able to install the SDK fine on your machine? What problems did you have?
Let me know by leaving a comment!