Install ANDROID Development Tools (ADT) on Ubuntu 10.04 (and Eclipse)

I recently installed eclipse 3.6 and Android Development Tools (ADT) on my fresh Ubuntu 10.04 install. I followed the excellent and simple Installation tutorial here. Installing Eclipse is as easy as downloading it from the official Download page (http://www.eclipse.org/downloads/) and extracting it to a desired folder. I chose the Classic Eclipse 3.6 download and I created a folder in my home, called /home/thierry/Applications.

To install the ADT in Eclipse 3.6, the official instructions can be found here, go to HELP > INSTALL NEW SOFTWARE. Enter the address  to WORK WITH:

https://dl-ssl.google.com/android/eclipse/

Click OK. Then Select ‘Developer Tools’ to install Android DDMS and ADT. Then click NEXT followed by FINISH. At that point I am now sure if I had to restart Eclipse, but as it is suggested, do restart Eclipse.

Install ADT in Eclipse

Start a new Android project under FILE > NEW > Other > Android. The Project Name would be HelloWorld, as Build Target I choose Android 2.2. Scroll down to find the Application Name: Hello Android and the package Name: com.yourexample.helloandroid. A first Hello World program is as follows

package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
tv.setTag("Hi freaks, look at me");
tv.setText("Mama");
tv.s
setContentView(tv);
}
}

To run the code and test the application, you don’t need to have an android device, but you can use the android emulator. Use RUN > RUN AS > ANDROID APPLICATION and the emulator should show up, it might take 1 minute to boot!

Android Emulator

Of course this is not what you have done in your HelloWorld, but to test your Android application you need to boot Android first. Play around with Android and go to Applications to find your Application called Hello Android. Click it to launch your Hello World.

P.S.: I have a problem that auto-complete in Eclipse with ADT freezes as soon as for example “tv.s” is written in the editor. Apparently this bug is related to xulrunner, but not for sure. This bug is however very annoying making development impossible. For a Java file the auto-complete is however working fine.

Where to go after the HelloWorld? Go to the official documentation site for Android project, the page with sample code,

4 Responses to Install ANDROID Development Tools (ADT) on Ubuntu 10.04 (and Eclipse)

  1. self worth says:

    Will you be in a position to guide me for your internet marketer or even the dude that looks after your site, I’d like to determine it might be possible to be considered a guests poster.

  2. Actonstrong says:

    Amazing
    Thanks for such an outstanding post..

  3. John says:

    Hello. I recently installed Ubuntu 10.04, and canNOT install the ADT plugin. By default, “sudo apt-get install eclipse” gives me the Galileo version. Fine, until trying to install the ADT. The Developer Tools box can be checked, but I get the following when I click Next:
    ===========================================
    Cannot complete the install because of a conflicting dependency.
    Software being installed: Android DDMS 18.0.0.v201203301601-306762 (com.android.ide.eclipse.ddms.feature.group 18.0.0.v201203301601-306762)
    Software currently installed: Eclipse Platform 3.5.2 (Eclipse Platform 3.5.2)
    Only one of the following can be installed at once:
    Eclipse UI 3.5.2.M20100120-0800 (org.eclipse.ui 3.5.2.M20100120-0800)
    Eclipse UI 3.7.0.v20110928-1505 (org.eclipse.ui 3.7.0.v20110928-1505)
    Eclipse UI 3.7.0.I20110602-0100 (org.eclipse.ui 3.7.0.I20110602-0100)
    Cannot satisfy dependency:
    From: Eclipse Platform 3.5.2 (Eclipse Platform 3.5.2)
    To: org.eclipse.ui [3.5.2.M20100120-0800]
    Cannot satisfy dependency:
    From: Android DDMS 18.0.0.v201203301601-306762 (com.android.ide.eclipse.ddms.feature.group 18.0.0.v201203301601-306762)
    To: org.eclipse.ui 3.6.2
    ==============================================

    So, what exactly does this mean? I read somewhere that I have to use Indigo, but this has worked before on a previous install of 10.04. Am I missing something?

    • littleiffel says:

      I heard there might be problems with eclipse installed from ubuntu repositories. To get it running with ADT, just download Eclipse from their homepage, unzip, and start the eclipse from folder with double click. (Folder Eclipse > eclipse ). Maybe you need to set the permissions on the file to make it executable.

      Hope this helps…Let me know

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre user="" computer="" escaped="">