Android Hello World : Example Application



In this example, we will be learning how to create sample android application using eclipse. In the previous chapter we have learnt about the different components of android application.

Android Application : Hello World Example

Now we are listing out all the steps to create android application using the eclipse. Firstly you need to right click inside the blank area of package explorer and then select New -> Android Application Project

Step 1 - Create new android project

Now after selecting the android application project we need to give proper name to android app. You need to change the default package name otherwise eclipse will throw warning message

You need to select the minimum required SDK to create your app compatible with older versions of android. Plese make sure that you will compile your app with latest version of android so that it will be compatible with newer versions of android

Step 2 - Give name to new android project

Now keep these setting as default for this hello application

Step 3 - New application

Now if you want to change the default icon of android app then you can choose icon otherwise you can keep it as default for practice app

Step 4 - Configure icon

keep these setting as default for this hello application

Step 5 - Create Activity

keep these setting as default for this hello application

Step 6 - Blank Activity

Step 7 - Finishing

In order to run the project you need to right click on the project name and run project as android application.

Step 8 - Running Project

In our case we have connected android device to computer using USB cable so it will prompt us below window. We have chosen android device to run our project.

Step 9 - Run on Android Device

Below output will be displayed when you run android project

Step 10 - Run on Android Device