Chapter 1 introduction background



Download 1.39 Mb.
Page2/9
Date09.06.2018
Size1.39 Mb.
#53724
1   2   3   4   5   6   7   8   9

Creating The Application

When at last you have all the software you need, you’re ready to start Eclipse and create a real, live Android app.

Starting Eclipse



  1. Launch Eclipse.

  2. If Eclipse shows you its Welcome screen, find that screen’s Workbench icon and then click it to open Eclipse’s main workbench.

  3. In the Eclipse workbench, make sure that the Java perspective is active.

Look for the word Java in the upper-right corner of the Eclipse workbench. If you see the word Java on an indented button (as in Figure 2), Eclipse’s Java perspective is active.

Figure 2 Eclipse’s Java perspective is active




  1. If the Java perspective isn’t active, choose Window⇒Open Perspective⇒Other⇒Java (Default).

As a result, the Java perspective opens right before your eyes. You’re ready to create an Android app.
Creating Project

  1. In Eclipse’s main menu, choose File⇒New⇒Project.

The New Project dialog box opens.

  1. In the New Project dialog box, expand the Android branch. In that branch, select Android Project and then click Next. (See Figure 3)

Figure 3 The New Project dialog box.




  1. In the New Android Project dialog box, type a name for your project in the Project Name field.

In Figure 4, I type My First Android Project.

  1. In the dialog box’s Build Target panel, select a target

In Figure 4, I select Android 3.0. You can select any target that’s listed, as long as you’ve created an Android Virtual Device (AVD, for short) that can run that target’s projects. For example, an Android 2.3.3 AVD can run projects targeted to Android 2.3.1, Android 2.2, Android 1.6, and so on. If you mistakenly select a target for which you have no AVD, Eclipse hollers at you when you try to run the project. (While it hollers, Eclipse offers to help you create the necessary AVD.)

  1. Find the Properties box of the New Android Project dialog box

On my computer, the New Android Project dialog box comes with its own scroll bar. To find the Properties box, I have to scroll down to the lower half of the dialog box. (See Figure 5.)




Download 1.39 Mb.

Share with your friends:
1   2   3   4   5   6   7   8   9




The database is protected by copyright ©ininet.org 2024
send message

    Main page