Step 02 - First Android Project - “HelloWorld”

In Eclipse, select File->New->Other. Navigate to Android, and select “Android Application Project”:

Step 02 - 图1

Press “Next” and then give the project a name: ‘HelloWorld’

It’s recommended you change the default package name also, (as in the screenshot) and accept the rest of the defaults, on the remaining screens.

Step 02 - 图2

You should choose An Empty Activity as your activity type

Step 02 - 图3

and name it as in the screenshot below

Step 02 - 图4

After you press “Finish”, you should now have something similar to the following:

Step 02 - 图5

Next, open up the AndroidManifest.xml file in Graphical View, select the ‘Application’ tab and change the ‘Theme’ to Theme.Holo.Light with Dark Action Bar, like below

Step 02 - 图6

Step 02 - 图7

Familiarise yourself with the project layout - the initial xml layout or “screen” is first displayed, this is one of the many resources you will be using and creating throughout this module. We will experiment later with modifying this layout, but first you should run the application.

Select the Project (HelloWorld)->Right-Mouse-Button->Run As->Android Application, as follows:

Step 02 - 图8

If you haven’t done so already, you will be asked to select/create an AVD (Android Virtual Device), as follows:

Step 02 - 图9

and

Step 02 - 图10

Use the settings as above and your first Android App should launch like so, (Once you’ve unlocked the device!):

Step 02 - 图11