Android learning-create a simulator (AVD)

Source: Internet
Author: User

Learn about simulator debugging in AndroidProgramVery convenient, but it will be slow to start the simulation for the first time,

When a simulator is created in Elipse, the XP system is created in the C: \ document and setting \ User \ directory by default, and the path cannot be changed,

Now we use command to create a simulator and add the directory of the specified simulator. The command is as follows:

CMD:

Android create-AVD-N gphone-T 6-C 512 M-P d: \ Android \-F-s qvga

After running this command, I want you to confirm another command and select N directly. If it is created successfully, the information of this AVD will be listed.

You can also use the android list AVD to view all avds on the local machine. Next, we will explain the parameter meanings in the command one by one.

Android create-AVD tells Android tool that you will create an AVD

Android create-AVD-N name: Specifies to change the AVD name. Traditionally, the avd I created will be named gphone.

Android create-AVD-N gphone-T 6: t parameter specifies that the simulated Android system version of this simulator is generally [1-8], you can use Android list targets to check the SDK levels you have installed. The 2.1-2.3 systems are 4

The android create-AVD-N gphone-T 6-C 512 M: C parameter determines the size of the sdcard of the simulator. Generally, the value is 512 M, generally, we only debug one android project, which is too large or too small.

Android create-AVD-N gphone-T 6-C 512 M-P d: \ Android \: p parameter specifies the directory where the simulator is created, as long as you have enough storage space, you can specify

Android create-AVD-N gphone-T 6-C 512 M-P d: \ Android \-F: F parameter indicates to forcibly overwrite the AVD created earlier in this directory with the same name

Android create-AVD-N gphone-T 6-C 512 M-P d: \ Android \-F-s qvga: S parameter specifies the skin of AVD, it can be qvga | WAGA...

You can also modify parameters in eclipse for the created simulator!

After creation, only run:

Emulator-AVD gphone can start the simulator, but I am very lazy and don't want to run such a command every time. So I created a bat and then double-click the bat to start the simulator, in this way, you can avoid starting the simulator in eclipse, causing eclipse to become very difficult. Change the bat content as follows:

 
C: \ Program Files \ Android-SDK \ tools \ emulator.exe-AVD gphone

Save the above paragraph as startavd. bat. Of course, if your android SDK directory has changed, change it to the appropriate directory!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.