Now we’re going to explore our first Android application which will be the famous Hello World application. We are going to explain the structure of an Android application and some of the basic concepts wee must understand
  1. Open Eclipse and select from the menu File>New>Android Project, you’ll see a window like this.
  2. Now there are several fields that appear here they are:
    Project Name: The Eclipse project name, the name of the folder that will hold the project files.
    Application Name:The name of the application that will appear on the phone.
    Package Name: The package name space, it sould be in the form of [abc].[xyz].
    Create Activity: the name of the basic activity class of your application. it’s optional to create.
    Min SDK Version: the minimum API level required by the application. You see in the Build Target list there is a list of the available SDK versions to use for the application and in front of each one the corresponding API level. You must ensure that you application API level is supported b the device.
  3. Press Finish then press run and choose run as Android Application, the emulator will start, wait until the main screen appears, unlock by pressing the menu button then you should see something like this

    Notice: the emulator may take a long time to boot so please be patient.
  4. Now go to the package explorer on the left bar of eclipse to your project

    folder navigate to src/[PackageName]/ this is the main activity class of your application. It should be like this:
    import android.os.Bundle;
    public class HelloAndroid extends Activity {
        /** Called when the activity is first created. */
        public void onCreate(Bundle savedInstanceState) {

  5. We will explain what each line in this code means later but now let’s understand what each folder in our project contains.
  6. The project contains the following folders

    Folder Name




    Contains all the source code (class files) for the project



    Contains the class file

    Generated automatically

    Android 1.5

    Its name changes according to the sdk version you use (1.5 here). Contains the Android API class files packed in android.jar files

    Generated automatically


    You can place any external resources (text files,images,…) in this folder. It’s much like the res file except it’s more like the file system where you put files that you want to access them as raw bytes



    Contains resources for the application



    Contains the images required for you application. You can add your own image files to this folder



    Contains the main.xml file that defines the view that construct the User Interface of the application



    Contains other resources that can be used for your application such as string resources, styles or colors


  7. So that was a quick look on the android project structure, in this post we will take a deeper look on the hello Android application.