AVD's full name is: Android Virtual Device, the Android operating device, is the Android simulator. To build Android to run, you have to create AVD, and you can configure a lot of running items on each AVD. There are two ways to create AVD. The first is through the Eclipse development environment, and the second is through the command line creation.
The 1.1 version of emulator after setting the environment variable, directly in the command line to enter the emulator can be started, but the 1.5 version of a so-called AVD (Android Virtual Device), AVD is equivalent to a simulator, However, you can use AVD to create a different version of the emulator, and then use the EMULATOR-AVD avdname command to start a different emulator, the following is a description of how to create AVD:
1. View the currently supported version (in the listed version we need to remember the ID value, which is used in step 2nd):
Copy Code code as follows:
2. Create AVD (the last 2 represents the creation of the 1.5 version of AVD):
Copy Code code as follows:
Android Create Avd–n Avdname–t 2
3. See if success is created (if successful will show the AVD information we just created):
Copy Code code as follows:
4. Start Simulator:
Copy Code code as follows:
5. Select the starting skin (horizontal simulator)
Copy Code code as follows:
EMULATOR-AVD Avdname-skin Hvga-l
6. According to the CTRL+F11, you can directly change the simulation of the horizontal vertical placement.
7. The actual creation of the AVD process and error handling methods
First create a AVD, and use the command line to create, for example:
Copy Code code as follows:
D:/android/android-sdk-windows-1.5_r3/tools>android Create Avd-n avd15-t 2
Android 1.5 is a basic Android platform.
Do your wish to create a custom hardware profile [No]
Created AVD ' avd15′based on Android 1.5
List the current AVD with the Android List AVD command:
Copy Code code as follows:
D:/android/android-sdk-windows-1.5_r3/tools>android List AVD
Available Android Virtual Devices:
Name:avd15
path:d:/My Documents/.ANDROID/AVD/AVD15.AVD
Target:android 1.5 (API level 3)
Skin:hvga
Notice the AVD directory above, copy the/.android folder from the above directory to C:/Documents and Settings/administrator, because I'm using the Administrator login, so copy it to this directory, It should actually be copied to the corresponding C:/documents and settings/user name, noting that the username is in English.
If you use EMLUATOR-AVD avd15, you will get the following error:
Copy Code code as follows:
Emulator:ERROR:no search paths found in this AVD ' s configuration.
Weird, the AVD ' s Config.ini file is malformed. Try re-creating it.
The reason for this error is that the INI file in the C:/Documents and SETTINGS/ADMINISTRATOR/.ANDROID/AVD directory contains Chinese characters-My Documents, so to modify this INI file-avd15.ini, Modify path to Path=c:/documents and SETTINGS/ADMINISTRATOR/.ANDROID/AVD/AVD15.AVD.
At this point, you can start the emulator:
Copy Code code as follows:
D:/ANDROID/ANDROID-SDK-WINDOWS-1.5_R3/TOOLS>EMULATOR-AVD avd15
Emulator:emulator window is out of view and is recentred
You can see Google's Android Simulator.
Run the project in Eclipse and choose Andorid Project. Will pop up the Android AVD error dialog box, select Yes,
Then appear Android virtual Device Manager:
Click Finish directly, then the Android Device Chooser dialog box appears:
The currently running emulator will be displayed, select it, and then OK.
At this point, the project application can be displayed in the emulator.
To sum up:
Start the emulator before you run the project in Eclipse.