Creating an AVD

To do this, you need to create an Android Virtual Device (AVD) using either Eclipse or the android avd command.6 It's easier to use Eclipse, so select Yes in the AVD Error dialog to open the AVD Manager. You can open the manager again later by selecting Window > Android SDK and AVD Manager.

6. http://d.android.com/guide/developing/tools/avd.html

New Android Project

Creates a new Android Project resource.

ira I

Project name; HelloAndroid Contents o Create new project In workspace

Create project from existing source 13 Use default location

Location: C:/Development/wo rkspa ce-''H el 1-oAndrord Create project from existing sample

Samples: ApiDemos Build Target

Standard Android platform 2,2 Properties

Application name: Hello, Android

Package name: org.example,hello

] Create Activity: Hello

Min SDK Version: 8

Finish

Cancel

Target Name

Vendor

Platform

API...

Android 1,1

Android Open

Source Project

1.1

2

Android 1,5

Android Open

Source Project

1.5

3

Google APIs

Googlelnc.

1.5

3

Android 1.6

Android Open

Source Project

1.6

4

Google APIs

Googlelnc.

1.6

4

Android ¿,0

Android Open

Source Project

2.0

5

Google APIs

Googlelnc.

2.0

5

Android ¿0,1

Android Open

Source Project

2.0,1

6

Google APIs

Googlelnc.

2.0,1

6

Android 2,1-upda,,,

Android Open

Source Project

2.1-upd...

7

Google APIs

Googlelnc.

2.1-upd...

7

0

Android 22

Android Open

Source Project

22

8

Google APIs

Googlelnc.

2 2

a

Figure 1.3: New Android project

Figure 1.4: Missing Android Virtual Device (AVD)

Click the New... button, and then fill out the fields for the new AVD as follows:

Name: em22

Target: Android 2.2 - API Level 8 SDCard: 64

Skin: Default (HVGA)

This tells Eclipse to set up a generic device called "em22," which has the Android 2.2 (FroYo) firmware installed. A 64MB virtual Secure Digital (SD) card will be allocated, along with a half-VGA (320x480) display.

When you are done, you should see something like Figure 1.6, on page 27. Because of updates in the SDK tools since this was written, your screen may look slightly different.

Click Create AVD to create the virtual device. A few seconds later you should see a message that the device has been created. Click OK, select the AVD, and then click Start... and then Launch to bring it up. Close the AVD Manager window when you're done.

0 0

Post a comment