官术网_书友最值得收藏!

Duplicating an existing AVD and modifying it by need

If you need a hardware profile based on an existing one, follow these instructions:

  1. Select an existing hardware profile and click on Clone Device.
  2. Update the hardware profile properties by your needs. To complete the wizard, click on Finish.
  3. Your profile appears in the hardware profile list.

Let's go back to the AVD list. Here, you can perform the following operations on any existing AVD:

  • Edit it by clicking on Edit
  • Delete by right-clicking and choosing Delete
  • Access the .ini and .img files on the disk by right-clicking on an AVD instance and choosing Show on Disk
  • To view the AVD configuration details, right-click on an AVD instance and choose View Details

Since we covered this, let's go back to the hardware profile list. Here, we can do the following:

  • Edit a hardware profile by selecting it and choosing Edit Device
  • Delete a hardware profile by right-clicking on it and choosing Delete
You can't edit or delete the predefined hardware profiles!

Then, we can run or stop an emulator or clear its data as follows:

  • To run an emulator that uses an AVD, double-click on the AVD or just choose Launch
  • To stop it, right-click on it and choose Stop
  • To clear the data for an emulator, and return it to the same state as when it was first defined, right-click on an AVD and choose Wipe Data

We will continue our emulators' journey with the explanation of command-line features that you can use with *-.

To start an emulator, use the emulator command. We will show you some basic command-line syntax to start a virtual device from a terminal:

emulator -avd avd_name [ {-option [value]} ... ]

Another command-line syntax is as follows:

emulator @avd_name [ {-option [value]} ... ]

Let's take a look at the following example:

$ /Users/vasic/Library/Android/sdk/tools/emulator -avd Nexus_5X_API_23 -netdelay none -netspeed full

You can specify startup options when you start the emulator; later, you can't set these options.

If you need a list of available AVDs, use this command:

emulator -list-avds

The result is a list of AVD names from the Android home directory. You can override the default home directory by setting the ANDROID_SDK_HOME environment variable.

Stopping an emulator is simple--just close its window.

It is important to note that we can run AVDs from Android Studio UI as well!
主站蜘蛛池模板: 钟祥市| 牡丹江市| 芜湖县| 三台县| 错那县| 广元市| 卢湾区| 车致| 石渠县| 南雄市| 西丰县| 东港市| 西乌珠穆沁旗| 景东| 石城县| 临猗县| 盐边县| 阿拉尔市| 湘乡市| 宜兰市| 德保县| 辽宁省| 洛浦县| 芜湖县| 延津县| 永兴县| 色达县| 顺平县| 濮阳市| 桃源县| 新巴尔虎右旗| 株洲县| 重庆市| 芷江| 义乌市| 洛宁县| 内黄县| 桂东县| 阿尔山市| 吉木乃县| 博湖县|