Setting up your Android development environment

improve this page | report issue


Prerequisite: If you intend to use MobileFirst Studio to develop your application, first read the Setting up your development environment tutorial.

Before you can develop, deploy, and test your Android applications, several steps are required for setting up the Android development environment. These steps include installing the Android SDK and ADT plug-in.

This tutorial covers the following topics:

Android SDK

The Android SDK provides the tools and APIs that are required to develop applications on the Android platform by using the Java programming language.

To install the SDK, visit the Android Developer Tools page and scroll to Other Download Options → SDK Tools Only to download the SDK installer.

Note: To use the Android SDK, use Oracle Java Runtime Environment (JRE).
Note: Gradle is currently not supported in Hybrid applications generated in either MobileFirst CLI or Studio.

ADT Eclipse plug-in

The Android Development Tools (ADT) plug-in for Eclipse is an integrated environment in which you can build rich Android apps.

To install ADT, in Eclipse:

  1. Click Help > Install New Software.
  2. Click Add and enter the name and location of the ADT plug-in.
    • The plug-in location is:
  3. Select Developer Tools and click Next to proceed with the plug-in installation.

SDK platform and virtual devices

Adding the SDK platform

  1. After the ADT plug-in installation is complete and Eclipse restarted, click Window > Android SDK Manager.
  2. In the SDK Manager, Under Packages, select the required API Levels, then click Install.

If the Android SDK Manager / AVD Manager is not visible on the Eclipse menu bar:

  1. From the Window menu bar item, click on Window > Customize Perspective > Command Groups Availability.
  2. Select the Android SDK and AVD Manager check boxes.

MobileFirst applications support API Levels 10 (Android 2.3) and above.
In a fresh installation of the ADT plug-in, it is bundled only with the latest available API Level. You might want to use the SDK Manager and add additional API Levels, such as 17, 18, and 19.

Adding a virtual device

To create a virtual device (emulator), click Window > AVD Manager and click New to create an Android Virtual Device (AVD) according to your needs.

For a detailed explanation of all available options, see the Android Developer documentation at Managing AVDs with AVD Manager.

You can now set up a device and develop applications.

Devices and developments

Setting up a device

To set up an Android device for testing and debugging, see the Android Developer documentation at Using Hardware Devices.

Developing applications

Building a MobileFirst application generates a separate Android project that is automatically displayed in Eclipse. For more information, see the Previewing your application on Android tutorial.

You can then run the Android application on the Android Emulator or device: Right-click the Android project and select 
Run As > Android Application.

Last modified on November 29, 2015