Sunday, 13 January 2013

Setting up Android development Environment

There are many ways to develop for Android and because of all the options it is sometimes a little daunting getting your environment setup. I found myself bouncing from web page to web page, not really sure if I had the right tools and if they were setup correctly. I wanted to document the process that worked for me. Here is the Method I used.



System Requirements

  • Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
  • Mac OS X 10.5.8 or later (x86 only)
  • Linux (tested on Ubuntu Linux, Lucid Lynx)
    • GNU C Library (glibc) 2.7 or later is required.
    • On Ubuntu Linux, version 8.04 or later is required.
    • 64-bit distributions must be capable of running 32-bit applications.

Tools Required
  • Eclipse IDE for Java Developers (v3.5 Galileo recomended but You can use any other)
  • Java Platform (JDK 6  or higher)
  • Android SDK Tools

Step 1:  Install Java Platform (JDK 6 or higher)


  • Now run the JDK installation. I did not change any of the default installation options. When complete continue to step 2.

Step 2. Install Eclipse IDE

  • I choose to use the Eclipse IDE for Java Developers (v3.5 Galileo). You can download  it here 
                Download "Eclipse IDE for Java Developers (92 MB)" from here         http://www.eclipse.org/downloads/

  • This is a zip file and does not require installation. Just copy the eclipse folder into your programs directory.

Step 3: Download the Android SDK Tools 


  • This does not require installation. Just unzip and copy the files. You can install the package anywhere but remember where you put as you will need to reference it in Eclipse. I happen to install it inside my eclipse folder.

Step 4:  Configure Android SDK

  • Launch "SDK-manager.exe" located in the Android SDK install folder"

  • Choose The platforms u want to install.
  • When done go to Tools in Menubar.


  • Now we are going to create a virtual device (AVD).
  • Select "New"
  •  Create the new Android Virtual Device
    • Name: Android4.2 (Any Name u Want) 
    • Target: Android 4.2 API Level 17 (Or which ever API you installed)
    • SD card Size:  200 MiB to 32000MiB 
    • Leave the rest at the default settings

  • Press "Create AVD". Be patient it may take a few minutes to create your new AVD.
  • Close the SDK setup. 
Step 5:  Configure Eclipse

  • Launch Eclipse for the first time. You will be asked where you want to your workspace folder to be located. 
    • I used the default location. 
    • Check "Use this as the default and do not ask again" so you don't have to answer this question every time. 
    • Press "OK".

  • Select "Help > Install New Software..."

  •  Press "Add".
  • Fill out the Add Site information
    • Name: Android
    • Location: https://dl-ssl.google.com/android/eclipse/
    • Press "OK"
        NOTE : If you get an error don't use SSL. change location from "https://dl- ssl.google.com/android/eclipse/" to "http://dl-ssl.google.com/android/eclipse/"
  •  After a connection is made and available tools are retrieved expand "Developer Tools" and select "Android DDMS" and "Android Development Tools"
  • Press "Next"

  • Press "Next" again.
  • Check "I accept the terms of the license agreements"
  • You may receive a Security Warning about unsigned content. Press "OK"
  • Done. Now you should restart Eclipse.
  • After rebooting we need to tell Eclipse where we copied the "Android SDK" in step 3.
  • Select "Windows > Preferences"
  • Select "Android" from the left pane. After you select "Android" you will receive an error. That is because it is not setup yet. We are setting it up now.
  • For the SDK Location, browse to where you installed the SDK.

  •  Press Ok.
  • A dialog box will appear. If you want to send usage data to Google leave it checked, other uncheck it and press "Continue". This dialog box can sometimes get trapped beneath your window. Minimize Eclipse if you don't see it.
                                                   You are now ready to build your first application.

1 comment: