Now we are ready to develop our first android application in Eclipse. First we create a simple “Hello Android” application. To develop this project, there is no need of coding.
Now we will start the project in Eclipse. Now click on Eclipse IDE shortcut to open the Eclipse and when it will open then the screen looks like as follows:
Now we have to specify the location for workspace where our application or projects will be stored, and if we don’t want to show again this Workspace launcher then check the Use this as the “default and do not ask again” and click on OK button. Now the Eclipse IDE will displayed as:
It is the welcome screen of the Eclipse IDE, now we have to close this Android tab and then it will show the blank screen as follows:
Now we create the first android application.
Now select File => New => Android Application Project shown in following diagram and click on Android Application Project.
When we click on this then a dialog box will open as follows:
This is the New Android application dialog box have the following options:
Application Name: In this, we have to specify the name of application which we want.
Project Name: In this, we have to give the name for project which we want to use.
Package Name: Here we have to specify the name for the package. The package name should be unique and according to the java programming which will use the Java standard coding rules to define the package name. For example, com.eitworld.android.
Minimum Required SDK: Here we have to specify the minimum required SDK for our android application from the several SDKs.
Target SDK: Here we have to define the target SDK form given list.
Compile With: Here we have to select the API for compilation means which API version, we want to use for compile the android application.
Theme: Here we have to specify the theme for our android application means which theme we want to use for application.
After filling all the required details, it looks like:
Now click on Next button, now configure project dialog box will open:
In this dialog box, we have to choose some options which are as follows:
Create custom launcher icon: This option is used for providing default launcher icon for android application. If we don’t want to default launcher icon then uncheck this option.
Create activity: This option is used to provide the activity for our app.
Create Project in Workspace: This option is used to save the project in defined workspace location, if we want another location to save the project then we have to uncheck this option then we have to specify the location for application.
Now click on Next button, now Configure launcher Icon dialog box will display as follows:
In this dialog, we can configure the following settings for application:
We can define the foreground image, clipart or text for the application.
We can define the launcher icon for the application and if we want to change the launcher icon then we can change the icon by browsing the icon image.
Here we can also perform the Trim Surrounding Blank Space setting for the application.
Here we can choose the foreground scaling such as Crop or center and can also use shape such as Square, Circle and default shape is none.
We can change the background color for our application.
Now click on Next button, now Create Activity wizard will open as follows:
Here several options are available related to the activity such as Blank Activity, Fullscreen Activity, Master/Detail Flow. Here we have to select Blank Activity and click on Next button.
Now Blank Activity wizard will open as follows:
In this Blank Activity wizard, we can change the name of activity or can use the default name for activity.
Here we can choose the navigation type for the application.
Now click on Finish button. Now our project window will open as follows:
This application window have the following facilities such as Package Explore, Palette, outline, properties window etc.:
By default , Eclipse provides the various facilities such as error finding is the biggest problem but eclipse provides the facility to finds the error automatically and show the indication with red mark displayed on the project which is placed at the project explorer such as
Eclipse provide the workspace feedback means when any error exist in the workspace then it will indicate via the icon overlays in red color such as
Eclipse provides the automatic compilation facility means when we made change in any file after that we save then it automatically compiles.