Creating First Android Project

This lesson is focused on creating first Android App using ADT bundle. (Install ADT bundle as discussed in Installation blog.)

  1. In Android Studio, create a new project.
  2. If its Welcome screen, click New Project.
  3. If a project is opened, select New Project from File Menu.
  4. The Create New Project screen appears.
  5. For Application Name use “Hello_World2”.
  6. For the other fields, use the default values and click Next

Brief Description :

  1. Application Name is the app name that appears to users.
  2. Company domain provides a qualifier that will be appended to the package name; Android IDE will remember this qualifier for each new project you create.
  3. Package name is the fully qualified name for the project (following the same rules as those for naming packages in the Java programming language).
  4. Project location is the directory on your system that holds the project files.
  5. Under Target Android Devices, accept the default values and click Next.
  6. The Minimum Required SDK is the earliest version of Android that your app supports, indicated using the API level. To support as many devices as possible, you should set this to the lowest version available.
  7. Under Add an Activity, select Empty Activity and click Next.

 

This created  a basic Android project as  “Hello World” app that contains some default files. We will see some of them :

  1. app/src/main/java/com.example.hello_world2/MainActivity.java : It contains the class definition for the activity you created earlier. When you build and run the app, the Activity starts and loads the layout file that says “Hello World!”
  2. app/src/main/res/layout/activity_main.xml:This XML file defines the layout of the activity. It contains a TextView element with the text “Hello world!”.
  3. app/src/main/AndroidManifest.xml : The manifest file describes the fundamental characteristics of the app and defines each of its components.

Program to show basic files of the app created.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *