Introduction

Developing applications for Android devices is facilitated by a group of tools that are provided with the SDK. You can access these tools through an Eclipse plugin called ADT (Android Development Tools) or from the command line. Developing with Eclipse is the preferred method because it can directly invoke the tools that you need while developing applications.

However, you may choose to develop with another IDE or a simple text editor and invoke the tools on the command line or with scripts. This is a less streamlined way to develop because you will sometimes have to call command line tools manually, but you will have access to the same amount of features that you would have in Eclipse.

The basic steps for developing applications with or without Eclipse are the same:

  1. Install Eclipse or your own IDE.

    Install Eclipse along with the ADT Plugin, or install an editor of your choice if you want to use the command line SDK tools. If you are already developing applications, be sure to update Your ADT Plugin to the latest version before continuing.

  2. Set up Android Virtual Devices or hardware devices.

    You need to create Android Virtual Devices (AVD) or connect hardware devices on which you will install your applications.

    See Managing Virtual Devices and Using Hardware Devices for more information.

  3. Create an Android project.

    An Android project contains all source code and resource files for your application. It is built into an .apk package that you can install on Android devices.

  4. Build and run your application.

    If you are using Eclipse, builds are generated each time you save changes and you can install your application on a device by clicking Run. If you're using another IDE, you can build your project using Ant and install it on a device using adb.

  5. Debug your application with the SDK debugging and logging tools.

    Debugging your application involves using a JDWP-compliant debugger along with the debugging and logging tools that are provided with the Android SDK. Eclipse already comes packaged with a compatible debugger.

  6. Test your application with the Testing and Instrumentation framework.

    The Android SDK provides a testing and instrumnetation framework to help you set up and run tests within an emulator or device.

Essential command line tools

When developing in IDEs or editors other than Eclipse, be familiar with all of the tools below, because you will have to run them from the command line.

android
Create and update Android projects and create, move, and delete AVDs.
Android Emulator
Run your Android applications on an emulated Android platform.
Android Debug Bridge
Interface with your emulator or connected device (install apps, shell the device, issue commands, etc.).

In addition to the above tools that are included with the SDK, you need the following open source and third-party tools:

Ant
To compile and build your Android project into an installable .apk file.
Keytool
To generate a keystore and private key, used to sign your .apk file. Keytool is part of the JDK.
Jarsigner (or similar signing tool)
To sign your .apk file with a private key generated by keytool. Jarsigner is part of the JDK.

If you are using Eclipse and ADT, tools such as adb and the android are called by Eclipse and ADT under the hood or similar functionality is provided within Eclipse. You need to be familiar with adb, however, because certain functions are not accessible from Eclipse, such as the adb shell commands. You might also need to call Keytool and Jarsigner to sign your applications, but you can set up Eclipse to do this automatically as well.

For more information on the tools provided with the Android SDK, see the Tools section of the documentation.

↑ Go to top