Thursday, August 1, 2013

Hello World Android

In my previous post I showed you how to setup a Android development environment. In this post I will show you writing your first Hello World Android application.

  1. Go to File Menu -> New -> Android Application Project.

    Drilling JAVA
    Hello World Android
  2. You will see the below screen once you click on the Android Application Project.

    Hello World Android
    Creating New Android Project

    The Application name and the project name can be differ as the project name is only used by the eclipse. But it should be unique in the workspace. Later on the application name will be used for creating the apk file. For example here the apk file will be created as HelloWorld.apk.

  3. Now it's time to configure the Android project. Here you can define the eclipse workspace location, Creating custom icon for you application, etc. 

    Drilling JAVA
    Configuring Android Project
  4. Now it's time to create your Android application icon. This icon will be displayed with the apk file as well as after installing the application as a short cut.

    Drilling JAVA
    Android Application Icon Creation
  5. After clicking on next you will see the below screen. This screen offers you to create the main activity where the application starts. It is a starting point of any android application.
    Android Activity Creation
    Create Android Activity
    Select blank activity for now. It will create a new blank activity, with an action bar and optional navigational elements such as tabs or horizontal swipe.
  6. Once you click on next after creating the blank activity, you will see the below screen. This screen is meant for defining a custom name for the main activity. By default it is MainActivity and layout name is main_activity.xml.
    Android Main Activity
    Configuring Android Main Activity
  7. On click of finish, the project will be created in the eclipse workspace.

No comments:

Post a Comment