Setting up Android Application Development Environment

I wasted some 3 hours to set it up. Did not exactly waste, I always find the setting the development environment the most annoying, difficult step in my development efforts. Here are some step by step instructions you can follow to save your time. This will include JDK, Eclipse, ADT Plugin and some configuration.

1. Install the Java Development Kit. I installed JDK 1.6. It can be installed from JDK DOWNLOAD . Make sure it is installed by going to command prompt and executing java -version

2. Download the Eclipse and Unzip it to a directory. I installed Version: Helios Release Build id: 20100617-1415 from http://eclipse.org/

3. Install the Android SDK. I downloaded the SDK from ANDROID SDK . To install unzip the directory and run the setup. It should bring up a utility where available packages and libraries would be downloaded. Create a test virtual device with 32 MB as your storage. Here is a screenshot after installation:

4. Add the Android SDK location to your Path (Go to Environment Variables and edit the path variable). In my scenario I added “C:\android-sdk_r06-windows\android-sdk-windows” to my path.

5. Install the ADT Plugin. Here is how:

Start Eclipse, then select Help > Software Updates…. In the dialog that appears, click the Available Software tab.

Click Add Site…

In the Add Site dialog that appears, enter this URL in the “Location” field:

https://dl-ssl.google.com/android/eclipse/Note: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).

Click OK.

Back in the Available Software view, you should see the plugin listed by the URL, with “Developer Tools” nested within it. Select the checkbox next to Developer Tools and click Install…

On the subsequent Install window, “Android DDMS” and “Android Development Tools” should both be checked. Click Next.
Read and accept the license agreement, then click Finish.

Restart Eclipse.

6. Now you have installed JDK, Eclipse, Android SDK and the ADT Plugin and updated your PATH to have the location of Android SDK. Open Eclipse –> Create New Project –> Android Project , Select a name for your application and a suitable API Version to be safe I chose (1.6)

7. After the new project is created try and build it. Ideally it should build fine but it did not. It had issues with the build path (the sdk libraries were not included in the build path). In the package explorer right click on your project and select properties. In the left pane click on “Java Build Path” and check the “Android 1.6” or whatever you selected as your API version.

8. Clean the project and build it again. If it builds fine go ahead and run it “Run As – Android Application”.

9. HOORAY !! Time for victory dance. Here is a snapshot of ANDROID App running in the emulator.

I am also a beginner in android application development and pretty excited about it since I can test and deploy my applications in my DROID. Cheers and have a great rest of the day. I am heading to the JAVA BAR.

Advertisements

2 Comments

Filed under Uncategorized

2 responses to “Setting up Android Application Development Environment

  1. Very informative

    Thanks for sharing with us !

  2. kaj

    Thanks Assad, I will try this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s