Android Hello World Example

This tutorial shows how to create a simple Android hello-world project in Eclipse, and run the hello-world project on Android Virtual Device (AVD).

Summary steps to develop an Android application :

  1. Download and install Android SDK ADT Bundle for Windows
  2. Create Android Project by Using Eclipse Wizard
  3. Create an Android Virtual Device (AVD)
  4. View Result

This Android Hello-World project is developed under Windows 7, and JDK 1.6 has been installed previously.

1. Download and Install Android SDK ADT Bundle for Windows

Download Android SDK first: This is the only tool you need to download to complete the following Hello-World example.

Unzip the downloaded file. (You can extract it to anywhere, but normally it should be under your program file directory.) There is an "eclipse" directory which already have Android development environment integrated. Go to the direction, and start eclipse by double clicking "eclipse".

2. Create Android Project by Using Eclipse Wizard

Create a new "Android Application Project" by following the wizard. The steps look like the following:







The project directory is like the following:

Now the project is successfully created, the next step is to create a virtual smartphone for the Hello-World to run.

3. Create Android Virtual Device

If you run the created hello-world project at this moment, the project will not run. Because there is no device set up yet. To run an Android project, you will need to create an Android Virtual Device (AVD), so that the created project can run on a virtual smartphone under emulator. You can also directly go to "Android Virtual Device Manager" by clicking the icon on the toolbar like the following:


If you don't set up an AVD first and run th project, the The following windows will be popped up to ask you to create an AVD. You can follow the following steps. Since I have an Nexux 4, I will add Nexus 4 as my AVD to run the project.





4. View Result





In this post, you have seen a very simple Android Hello-World application. As shown above, Android project can be quickly developed by using eclipse with ADT integrated. The next step is understanding the content of the code.

Category >> Android  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
String foo = "bar";