Original article. If reprinted, please indicate the source:
Original article, if reproduced, please indicate the source: http://blog.csdn.net/yihui823/article/details/6686568
Prerequisites: eclipse and ADT have been installed. The android SDK has been downloaded. Android SDK has been set in eclipse.
This article introduces the android debugging tools. I hope it will be helpful to you.
Virtual Machine
You can use the command line to start the android virtual machine. In the [Android-SDK-Home]/tools directory, an emulator executable file starts the virtual machine. It is not convenient to include a bunch of parameters. People who like to study can use emulator-help to view help.
In the ADT of eclipse, the management of Android virtual machines is integrated. In Windows, the sub-menu is Android SDK and AVD manager. The following window is displayed: Tools-001
AVD is an android virtual device, or an android virtual machine. Create a new virtual machine and click "new ..." Button, for example, tools-002
Here are the parameters for creating a simulator.
Name:Virtual Machine name. We recommend that you use meaningful words instead of AAA words.
Target:Which Android version is built on.
SD card:Is an optional parameter. If this parameter is not specified, no SD card is displayed in the VM. You can directly specify the size for eclipse or the image file of the SD card. If an image file is specified, multiple virtual machines can share one SD card. To create an image file, you can use the mksdcard command line tool in the [Android-SDK-Home]/tools directory. The command can be used as follows:
Mksdcard-l tmpcard 120 m E:/tmp. img
Skin:Virtual Machine skin. That is, the default mobile phone hard keyboard. Of course, the most important thing here is to specify the screen size of the virtual machine. If you select built-in, a system hard Keyboard will appear. If you specify a resolution, the virtual machine will have only one screen.
Hardware:Define virtual machine parameters. I will describe several useful parameters in detail in the next step.
Create a virtual machine, as shown in figure: Tools-003
Now let's start it, for example, tools-004.
Click Start... Button to display an option window, such as tools-005:
Scale display to real size is the actual size, that is, the simulator is displayed according to the display resolution of the PC. If this parameter is not selected, the default parameter is used. Click the "lanch" button to start the android simulator. For example, tools-006:
Multiple virtual machines can be started, but only one AVD can be started. That is to say, we can create two avds and start them at the same time. The two virtual machines have different ports. Generally, the first start port is 5554, and the second port is 5556. On the virtual machine at port 5554, we dial "5556" and we can see that there is a call from the virtual machine at port 5556. The incoming call number is 5554.
In addition, press Ctrl + F11 to see what happened? Haha, you have converted the portrait screen to the landscape screen.