CREATING YOUR FIRST ANDROID APPLICATION

With all the tools and the SDK downloaded and installed, it is now time to start your engine! As in all programming books, the first example uses the ubiquitous Hello World application. This will enable you to have a detailed look at the various components that make up an Android project.

TRY IT OUT: Creating Your First Android Application

codefile HelloWorld.zip available for download at Wrox.com

1. Using Eclipse, create a new project by selecting File ⇒ New ⇒ Project. . . (see Figure 1-20).

image

NOTE After you have created your first Android application, subsequent Android projects can be created by selecting FileNewAndroid Project.

2. Expand the Android folder and select Android Project (see Figure 1-21).

3. Name the Android project as shown in Figure 1-22 and then click Finish.

image

NOTE You need to have at least a period (.) in the package name. The recommended convention for the package name is ...

Get Beginning Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.