How to Setup Android Application Development on Eclipse

Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language. Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications.

Android 2.1 on Emulator

This tutorial is intended for new developers that want to start developing Android applications using Eclipse IDE. To start develop, you have to install Java platform (JDK)  first and then  install the Eclipse,  Android SDK and the  Android Development Tool (ADT) plugin for Eclipse.

Download and Install JDK

Download and install the latest JDK (JDK 1.6 Update 18) from JDK download page

Download and Install Eclipse IDE

Download and install Eclipse Classic 3.5 (Galileo) from Eclipse download page. You can also use the  Java or RCP version of Eclipse.

Download and Install Android SDK Starter Package

The Android SDK starter package includes only a single component, the latest version of the SDK Tools. Included in that component is a tool called Android SDK and AVD Manager that you can use to download other components from the SDK repository site.

  • Download the latest Android SDK  starter package  from the SDK download page.
  • Unpack the archive to a suitable location on your machine. By default, the SDK files are unpacked into a directory named  android-sdk-<machine-platform> . For example, on Windows platform the directory will be android-sdk-windows.
  • Android SDK

    Android SDK

Add Android Platforms to Your SDK

To add one or more Android platforms (for example, Android 1.6 or Android 2.1) to your SDK, use the Android SDK and AVD Manager, included in the SDK starter package. It is recommended  to download multiple platforms, so that you can build your application on the lowest version you want to support, but test against higher versions that you intend the application to run on.

  • Launch the Android SDK and AVD Manager on Windows by executing SDK Setup.exe at the root of the SDK directory. On Mac OS X or Linux, execute the android tool in the /tools/ folder.
  • On Available Packages menu, select the platforms to download (1.1 to 2.1).
  • If you find error on HTTP SSL while fetching the repository url , try to use http instead of https by checking the Force https://… sources to be fetched using http://… option on Settings menu.
  • Click Install Selected and then select Accept All to accept selected packages.
  • Click Install Accepted button to start download and install the selected packages.

Download and Install ADT Plugin

To install  the ADT Plugin, you can take advantage of the Eclipse remote update feature. By setting up a remote update site, you can easily download, install, and check for ADT updates. Alternatively, you can download the latest ADT to your development computer as a local site archive.

  • Launch Eclipse, then select Help –> Install New Software.
  • In Available Software dialog, click Add
  • Enter a name for the remote site (ex: Android Plugin) in the Name field and in the Location field, enter this URL:
    https://dl-ssl.google.com/android/eclipse/
    and then click OK. If you have trouble acquiring the plugin, you can try using ‘http’  instead of  ’https’  in the URL.
  • Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools and then click Next.
  • On the next dialog, click Next to read and accept the license agreement and install any dependencies, then click Finish.
  • Restart Eclipse
  • To check whether the ADT has been installed correctly, try to create a new project by select File > New > Project., you shoud find Android Project listed on project wizard.
Update March 12, 2010:
On early March 2010, Android team has released SDK Tools Revision 5 (r5) that fixes problem on fetching repository using SSL (https). It is also highly recommended to use ADT Plugin version 0.9.6  because SDK Tools r5 is designed for use with ADT 0.9.6 and later.
facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Comments

  1. becker666 says

    IS the 3.5 Galileo working for real ??? I;’m getting all kinds of weird error and googling around they seem to recommen t use 3.4 instead

  2. says

    I have Windows 7 64-bit and I attempting to get set up for Android development.

    Should I install the 64-bit JDK? When I was at the JDK download site, it selected the non-64-bit JDK; the 64-bit was listed but not selected. I assumed it did that for a good reason, but I would prefer guidance about that.

  3. says

    Your instructions say “Download and install Eclipse Classic 3.5 (Galileo)”. I installed Eclipse Classic Version 3.6.0 (file eclipse-SDK-3.6-win32-x86_64.zip). Should that work? I assume the only reason why your instructions say to use 3.5 is that it was written before 3.6 was available but I want to make sure.

      • says

        Thank you, Lorenz.

        In the Google Groups Android Beginners group I asked about Eclipse 3.6; they said there is a bug in 3.6 so we should not use 3.6 until there is a fix or workaround.

        I did get the Android SDK installed, at least as far as your instructions took me. Thank you for the help, it works.

  4. Nova Mary says

    As I follow this tutorial an error occur ie “https://dl-ssl.google.com/android/eclipse/” is duplicate location.How can I solve this

    • Ton says

      You don’t have to delete the site. When you are in the dialog for ‘Install new software’ you will find a link below the dropdown with site call ‘Available software sites’. When you click that you will be able to enable the destination by adding a checkmark in front of it. After that it will be available in the dropdown for use.

  5. Indy John says

    Lorenz,

    Very nice tutorial. I have a 64-bit Windows 7 machine. I installed the jdk1.6.0_21, android-skd_r06-windows and ecllipse-jee-helios-win32_64. I am able to perform the steps you indicate seemingly without error. Yet when I restart eclipse and open File| New | Project, the Android choice does NOT appear. Any help would be appreciated. Thank you.

      • Indy John says

        Everything else I’ve seen on the net agrees with what you say. I’ll remove helios and install galileo. I’ll let you know how that goes. Cheers.

  6. Maneesh says

    I wanted to know can i download the android sdk platform 2.1 api revised 2 manually since for the internet connection i use mobile and it is very slow…
    plz help i am not able to download it fast…

  7. MN says

    I am now working with android 1.6.How can I update it to Android 2.2.I tried it using ‘Available Packages’ ,but its not working but resulting an Unzip failed error.How can I solve it.

  8. Me says

    Too bad java sucks and such BS shouldn’t be necessary, like when you install Visual Studio and everything you need to develop web/desktop/phone/xbox applications all from one easy install.

  9. Pinky Dhirai says

    Hi Lorenz,

    Thanks a lot for publishing such an informative tutorial. I am new to Android Programming and have been assigned a project on this just recently. I dint know where to start but your detailed steps helped me with setting up the environment to start with Android Programing. Thanks once again.

    Just one question, when I launch the Android SDK and AVD manager, in the Available Packages section, you have mentioned to download 1.1 and 2.1. However, I can see SDK platforms starting from 1.5 to 3.2 in Android Repository and some third Party Add-ons as well. Can you please tell me which platform i need to download to start with and whether to download the Third Party Add-ons?

    Also, do you have any tutorial which can tell me how to create a sample Andorid web application in Eclipse?

    Awaiting for your response.

    Thanks,
    Pinky

  10. RStar says

    After selecting….ADT Plugins, when I click on Next, I get this error…”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 found”

    What do I do, in this case?

  11. jo_san says

    hai,

    very nice work… thanks… i have a problem in configuring ADT with Eclipse…. the ADT packages r installed and Eclipse also restarted successfully… but when i am trying to open a new project in Android i could’nd find any “ANDROID” group in new projects Wizard…. expecting a better solution from u….

  12. Mujadad Rao says

    Please lorenz help me out! I don’t know anything about programming. I am new to this. I downloaded Eclipse Classic v4.2. Most of youtube video tutorials says to download Eclipse IDE for Java Developers.. Is it okay to use Eclipse Classic???

  13. Android Application Development says

    It was really nice and easy to understand tutorial very helpful to beginners.Just looking forward for your next post.

Leave a Reply

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