0

Creating an Android Project

Posted on Monday, May 20, 2013

An Android project is a collection of files and folders that contains the source code, configuration and resource files needed to build an Android app. When we start a new project, we need to create the application structure. Let’s see how the Android studio IDE does this for us.

New Project

Once started, Android studio welcomes us showing this screen:

We want a new project, so, to create a new project follow these steps:
  • Select “New Project...” 
  • Fill in the fields as shown below: 

Application name: It is the name that users will see. This name is shown in the Play Store and in Manage Applications.
Module name: This name is only used inside the IDE. You can enter here the same name as above.
Package name: This name is an identifier for your application, which has to be unique and a valid Java package name. It will be the same during all the application lifecycle.
Project location: A folder on your hard disk where the project will be stored.
Minimum required SDK: Is the lowest version of Android that your application will support.
Target SDK: The highest Android version that the app has been tested.
Compile with: The SDK version against which the app will be compiled. It should be the highest latest version of Android.
Theme: The UI style of your app.
Create custom launcher icon: This allows us to change the default launcher icon and use our own.
Create activity: If this box is checked, the IDE will create a default Activity for the app. An Activity represents the presentation layer in Android, it creates a window to place your UI elements that interact with the user. We can have more than one activity, and switch between them in runtime.
Mark this project as a library: A library is a project whose source code and resources will be used in other Android projects. They can’t be used as an application.
  • We have chosen to create a custom launcher icon, so now we can change the default icon by our own image. Play with the options available until you’re satisfied with the result and click Next

  • Now leave the default option “Blank Activity” selected and press Next

  • Leave these option as they are, and press Finish

Android studio will now build the project structure. After this work is completed you will see this screen:

Now we have our first Android project created. In next posts we’ll learn about the structure of a project and the meaning and use of the files and folders created.

Discussion

Leave a response