Home > Uncategorized > Getting Started with Android Development

Getting Started with Android Development

January 10th, 2011 Leave a comment Go to comments

This tutorial shows you how to download and install Android SDK to get you started developing Android applications.

The objective of this android  tutorial would be

a) Install the Android SDK on Windows  and configure with eclipse

b) Create an Application that Runs on the Android Emulator

1.Install Java (if it is not on your machine)

Goto http://www.oracle.com/technetwork/java/javase/downloads/index.html

Click on Download JDK button

Select Platform and Language for your download and click on license Agreement checkbox  

Click on continue button. Then
Click on jdk-6u23-windows-i586.exe for download

Now save file and install the jdk.

2. Install Eclipse

Eclipse is a professional editor.

Go to http://www.eclipse.org/downloads/ . Click on Windows 32 Bit from the right side download icon of Eclipse IDE for Java Developers row.

Click on download icon.

After it has finished downloading, you will have this file in your directory. Unzip this file.

Now you find the eclipse.exe file from your unzip folder directory and double-click on the file eclipse.exe to run Eclipse editor. You will see this.

Click ok.

2.1. Install the ADT Plug-in

  • · Start Eclipse, then select Help > Software Updates or Help>Install New Software…. In the dialog that appears, click the Available Software/Install New Software tab.

  • · Click Add Site.
  • · In the Add Site dialog that appears,

Copy and paste this link into input box “Location/Work with”: https://dl-ssl.google.com/android/eclipse/

Back in the Available Software view, you should see the plugin. “Android Developer Tools”, and “Android Editors” should both be checked. The Android Editors feature is optional, but recommended. Then click on the button “Install …”

Click on the button next

Check the “I accept the terms of the license agreements” and click Finish.

Eclipse will ask to restart, click on the button Yes.

After restart, update your Eclipse preferences to point to the SDK directory:

If you want to know more then go to  http://developer.android.com/sdk/eclipse-adt.html and read the content Downloading the ADT Plugin

2.2. Android SDK

Download the Android SDK from the Android homepage under Android SDK download . The download contains a zip file which you can extract to any place in your file system, e.g. I placed it under “c:\android” .

2.3. Configuration

In Eclipse open the Preferences dialog via Windows -> Preferences. Select Android and maintain the installation path of the Android SDK. Click Apply, then OK.

Now, set your PATH environment variable by right click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path under System Variables. Add the full path to the tools/ directory to the path, in this case, it is: ;C:\android\android-sdk-windows\tools. Then click OK , OK , OK.

2.4.Create an AVD

In this tutorial, you will run your application in the Android Emulator. Before you can launch the emulator, you must create an Android Virtual Device (AVD). An AVD defines the system image and device settings used by the emulator.

To create an AVD:

In Eclipse, choose Window > Android SDK and AVD Manager.

2.3. Configuration

In Eclipse open the Preferences dialog via Windows -> Preferences. Select Android and maintain the installation path of the Android SDK. Click Apply, then OK.

Now, set your PATH environment variable by right click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path under System Variables. Add the full path to the tools/ directory to the path, in this case, it is: ;C:\android\android-sdk-windows\tools. Then click OK , OK , OK.

2.4.Create an AVD

In this tutorial, you will run your application in the Android Emulator. Before you can launch the emulator, you must create an Android Virtual Device (AVD). An AVD defines the system image and device settings used by the emulator.

To create an AVD:

In Eclipse, choose Window > Android SDK and AVD Manager.

  1. Select Virtual Devices in the left panel.
  2. Click New.

The Create New AVD dialog appears.

3. Type the name of the AVD, such as “testAVD”.

4. Choose a target. The target is the platform (that is, the version of the Android SDK, such as 2.2) you want to run on the emulator.

5. Click Create AVD.  Your new AVD is created now!

Create a New Android Project

After you’ve created an AVD, the next step is to start a new Android project in Eclipse.

  1. From Eclipse, select Select File -> New -> Other…

Click on Android Project and click Next.

2. Fill in the project details with the following values:

  1. Project name: HelloAndroid
  2. Application name: Hello, Android
  3. Package name: com.droidbd.helloandroid (or your own private namespace)

4. Create Activity: HelloAndroid

5.  Min SDK version :        8 (as per API level)

Click Finish.

Run the Application

The Eclipse  plug-in makes it easy to run your applications:

  1. Select Run > Run.

Or Right click on project from project explorer and go

Run as ->Android Application

Yeah, you will see a black screen at your AVD with Your application name and a “Hello …..” text.

Enjoy android. Below is the code of the above tutorial.

Sample Code.zip

Categories: Uncategorized Tags:
  1. varkeyed
    April 14th, 2012 at 15:14 | #2

    Hi,
    I would like to thank you for the information that you published in your website. I also have a query. I did everything as you said. But, I could get a black window with some keyboard like stuff on its right side with numbers, alphabets etc. Also, I could see some “call”, “disconnect” , “home” buttons on top of it. I could not see any “hello” text. I could see my command prompt window appearing and dissappearing. Please give me some information to rectify the problem.

    Thank you

  2. Akheel
    April 9th, 2012 at 05:00 | #3

    Thanks..
    But it’l be good if you give some project example like calculator or somethin which stil clearly defines

  3. Subbu.B
    February 29th, 2012 at 05:57 | #4

    Thanks so much for posting the tutorial on setting up Android Eclipse environment

  4. Subramanyam.B
    February 29th, 2012 at 05:54 | #5

    Thanks so much.It gives more information on android and also what softwares are needed to develop android.i am very happy visiting this website,once again thanks so much.And i need more explanation about how gps is work on android mobile

  5. January 13th, 2011 at 07:43 | #6

    Thanks so much for posting the tutorial on setting up Android Eclipse environment. It was very helpful as I am starting to learn Android Application Development.

  1. January 10th, 2011 at 12:44 | #1
  2. January 16th, 2011 at 22:12 | #2
  3. July 23rd, 2011 at 14:17 | #3
  4. November 4th, 2011 at 06:24 | #4
  5. November 4th, 2011 at 06:26 | #5
  6. November 4th, 2011 at 06:38 | #6
  7. November 4th, 2011 at 06:43 | #7
  8. November 4th, 2011 at 06:58 | #8
  9. November 6th, 2011 at 08:57 | #9
  10. November 16th, 2011 at 13:12 | #10
  11. May 15th, 2012 at 19:40 | #11
  12. September 5th, 2012 at 17:51 | #12
  13. September 21st, 2012 at 15:11 | #13