Site icon PCSalt

Create Android Application Project

Creating Android Application Project for beginners is a hectic task. The reason is beginners don’t understand the jargon used in the wizard for project creation. If you are opening eclipse for the first time then it will ask to setup a workspace for storing all the project. Browse the location or use the default its up to you. So, here is the process to create an Android Application Project.

  1. Create new Android Application Project. You can create it using any of the following option
    • File>New>Android Application Project,
    • Alt+Shift+N>Android Application Project,
    • Ctrl+N>Android>Android Application Project,
    • Right Click in Package Explorer and select Android Application Project.

    Select “Android Application Project”

    (If you didn’t find the option thenCtrl+N>Android>Android Application Project)

  2. Now, you have a dialog box asking for
    • Application Name: This application name is shown in the Play Store, as well as in the Manage Application list in Settings.
    • Project Name: The project name is only used by Eclipse, but must be unique within the workspace. This can typically be the same as the application name.
    • Package Name: The package name must be a unique identifier for your application (This comes in action when it is installed). It is advised to use the reverse domain name of the organization plus one or more application identifiers, e.g. com.pcsalt.app_name.
    • Build SDK: It is the target API to compile the code against. This is typically the most recent version, or the first version that suports all the APIs you want to directly access.
    • Minimum Required SDK: The lowest version of Android your application can support.

    Click Next when done.

  3. Now the dialog box will setup the launcher icon for your application. You have options to choose it from Image, Clipart or Text. Click Next when done.
    Configure Launcher Icon
  4. Now eclipse is creating activity for your application. So, the options available are BlankActivity and MasterDetailFlow. For now, select BlankActivity and click Next.
    Create Activity
  5. Now you have to name your activity by filling following fields:
    • Activity Name: Name of your JAVA class to create activity.
    • Layout Name: Name of XML file used to create GUI for activity.
    • Navigation Type: The type of navigation used for the activity, viz. Tabs, Tabs+Swipe, Swipe View + Title Stripe and Dropdown. Select either of these or leave it to default none.
    • Hierarchical Parent: Generally used to provide a parent while using “Up” arrow in navigation.
    • Title: The title you want to display in the activity in your application.

    Click Finish when done.

    New Blank Activity

After pressing the finish button, eclipse creates a directory structure and generates some files. Your screen stops at the layout XML file of your application.

Directory Structure of Android Application

Exit mobile version