Set up an Android Development Environment

The Android mobile operating system has seen a tremendous increase in adoption by mobile phone manufactures. This has had the effect of creating a large user base of Android followers. Naturally, with the increase in the popularity of Android devices, the desire for quality application intensifies. Android is based on the Java development language and any beginner-level Java developer can jump right in and start developing applications.

The purpose of this guide is to outline in detail the steps necessary to set up the initial development environment for creating Android applications. The guide will address the installation of the Android Software Development Kit (SDK) and the initial set-up necessary for allowing Android OS emulation. The intended audience for this guide is beginner-level developers with basic knowledge of Integrated Development Environments (IDE). With a little dedication and hard work, you can start making Android applications very soon.

Steps

Initial steps

  1. Download an IDE.
  2. Install Eclipse.
    • Make sure to take note of the installation directory and workspace for later reference.
  3. Download and install the Java Runtime Environment (JRE).
  4. Download and install the Java Development Kit.

Android SDK

  1. Install the Android SDK
    • The SDK starter package includes the Android SDK and AVD Manager. This is a tool that we will now use to download some required SDK components into our development environment.
    • The starter package we downloaded only contains the newest version of the SDK tools. In order to develop Android applications, we will need to download at least one Android platform so we can emulate a phone/tablet via our computer hardware.
    • In the root of the SDK directory, find and execute the SDK Manager.exe file. Note: Right-click and run as administrator to avoid any permission declination.
    • Choose the Android platform version which you wish to develop on and click Install packages. You will be prompted with a pop-up, check off Accept and click Install.
  2. Download and Install the Android Development Tools (ADT) plugin for Eclipse
    • Google provides a custom plugin for Eclipse, called ADT, that aids developers in creating Android applications faster and more efficiently.
    • Open Eclipse and select Help-->Install New Software
    • Click Add
    • In the pop-up dialog, type 'ADT Plugin' in the Name field and enter the following URL in the location field: https://dl-ssl.google.com/android/eclipse/
    • Click OK. If you're having issues in downloading the plugin, use "http" instead of "https".
    • Select the 'Developer Tools' option and click Next. Once the tools are downloaded, click Next.
    • Read and accept the License Agreements. When you are done, click Finish and restart Eclipse.
      • Note: you may encounter a Security Warning message notifying you of unsigned content. If you do, click OK.
  3. Configure ADT plugin
    • In Eclipse, select Window --> Preferences .
    • Select Android from the panel on the left. Choose if you want to opt into sending usage statistics and click Proceed.
    • In the SDK Location field, click Browse and choose the directory where you saved the Android SDK in step
    • Click Apply -->OK. You have now configured the ADT plugin successfully.
  4. Configure an AVD
    • Next , set up an AVD so that you can emulate a phone/tablet using your computer hardware. This will allow you to test the application being developed without requiring a physical Android device.
    • In Eclipse, navigate to Window --> AVD Manager. Click New… to fill in the details of the virtual device.
    • Choose a name that conforms to the naming rules specified at the bottom of the window.
    • The Target field specifies the version of Android you wish to have the virtual device running on. Notice that the list of the drop down menu only contains version of the Android OS that you selected to download during the SDK installation step. If you want the AVD to run another version of the OS, you must download appropriate version packages in the SDK Manager.
    • The rest of the options relate to the specific features that you wish to customise the AVD with. These features represent hardware features present on physical Android devices. For instance, you may customise the screen resolution of the emulated device, availability of GPS. You can even specify a custom battery level state to test particular usage scenarios that app-users may encounter.
    • Once you are satisfied with the configuration of the AVD, click Create AVD
  5. Congratulations, you have now completed the setup of the Android development environment. You are ready to begin coding your very first Android application. There is an abundance of tutorials on the web regarding the creation of a simple app. Outlined below are some handy links for your consideration.

Tips

  • When installing any software mentioned in this guide, always make sure to install the version that is compatible with your OS version (32/64 Bit). Failure to do so may cause compatibility errors later on.
  • When installing the SDK, choose the standalone installer .exe file for an easier time during installation.
  • If the installation of SDK components fails, run the SDK manager under 'Administrator Permission'

Things You'll Need

  • PC/ Laptop running a version of Microsoft Windows Operating System ( For purpose of this guide)
  • An active Internet connection
  • 500+ MB of hard-drive space (for installations)
  • More detailed requirements are found here: http://developer.android.com/sdk/requirements.html

Sources and Citations