- The Android Game Developer's Handbook
- Avisekhar Roy
- 395字
- 2021-07-14 10:28:59
Android Virtual Device
An Android Virtual Device (AVD) is a software-produced model of a real device, which can be configured with custom hardware specifications. It can be a virtual copy of the real device as well. This is one of the most important tools for any Android developer. This lets the developer test the application in a typical Android environment without using an actual hardware device, to cut short the development time (image source: http://www.geeknaut.com/images/2014/08/top-android-emulators-for-windows3.png):

Configuring AVD
An AVD consists of the following:
- Hardware profile: This profile describes the hardware features of the virtual device. This can be configured with hardware options like a QWERTY keypad, camera, integrated memory, and so on.
- System image mapping: The running Android platform version can be configured depending on the installed set of Android platforms. Android platforms can be installed by the Android SDK manager.
- Dedicated disk space: Dedicated storage area on your development machine can be set with this feature, which saves the emulator's user data and the virtual SD card.
- Other features: The developer can even specify the look and feel of the virtual device such as device skin, screen dimension, and appearance.
The following is the brief procedure to create an AVD through AVD manager, which is located in the <SDK Path>/tools
directory:
- On the main screen, click on Create Virtual Device.
- In the Select Hardware window, select a device configuration such as Nexus 5, then click on Next, then click on Finish.
- To begin customizing the device by using an existing device profile as a template, select a device profile and then click on Clone Device. Or, to create a complete custom emulator, click on New Hardware Profile.
- Set the following to create a new custom emulator:
- Device name
- Screen size
- Screen resolution
- RAM
- Input options
- Supported states
- Camera options
- Sensor options
- After setting every property, click on Finish.
The developer can also create a new custom emulator using the command line, as follows:
android create avd -n <name> -t <targetID> [-<option> <value>] ...
Here, the following options can be set:
name
: This will be the custom AVD nametargetID
: This will be the custom IDoption
: This can include options such as device screen density, resolution, camera, and so on.
The developer can execute this command to use a previously defined AVD:
android list targets
Then, the developer can run the following command:
emulator –avd <avd_name> [options]
- Java面向?qū)ο笏枷肱c程序設計
- 信息可視化的藝術(shù):信息可視化在英國
- 算法基礎:打開程序設計之門
- 數(shù)據(jù)結(jié)構(gòu)簡明教程(第2版)微課版
- Web Application Development with MEAN
- Getting Started with SQL Server 2012 Cube Development
- Microsoft Azure Storage Essentials
- ASP.NET程序開發(fā)范例寶典
- Elasticsearch搜索引擎構(gòu)建入門與實戰(zhàn)
- C++服務器開發(fā)精髓
- HTML5 WebSocket權(quán)威指南
- 跟小樓老師學用Axure RP 9:玩轉(zhuǎn)產(chǎn)品原型設計
- Python人工智能項目實戰(zhàn)
- HTML5 and CSS3:Building Responsive Websites
- INSTANT Apache Maven Starter