Home | History | Annotate | Download | only in devices
      1 page.title=Managing Virtual Devices
      2 @jd:body
      3 
      4 
      5  <p>An Android Virtual Device (AVD) is an emulator configuration that lets you model an actual
      6   device by defining hardware and software options to be emulated by the Android Emulator.</p>
      7 
      8   <p>The easiest way to create an AVD is to use the graphical <a href= 
      9   "{@docRoot}tools/devices/managing-avds.html">AVD Manager</a>, which you launch
     10   from Eclipse by clicking <strong>Window &gt; AVD Manager</strong>. You can also start the AVD
     11 Manager from the command line by calling the <code>android</code> tool with the <code>avd</code>
     12 options, from the <strong>&lt;sdk>/tools/</strong> directory.</p>
     13 
     14   <p>You can also create AVDs on the command line by passing the <code>android</code> tool options.
     15   For more information on how to create AVDs in this manner, see <a href= 
     16   "{@docRoot}tools/devices/managing-avds-cmdline.html">Managing Virtual
     17   Devices from the Command Line</a>.</p>
     18 
     19   <p>An AVD consists of:</p>
     20 
     21   <ul>
     22     <li>A hardware profile: Defines the hardware features of the virtual
     23     device. For example, you can define whether the device has a camera, whether it uses a physical
     24     QWERTY keyboard or a dialing pad, how much memory it has, and so on.</li>
     25 
     26     <li>A mapping to a system image: You can define what version of the Android platform will run
     27     on the virtual device. You can choose a version of the standard Android platform or the system
     28     image packaged with an SDK add-on.</li>
     29 
     30     <li>Other options: You can specify the emulator skin you want to use with the AVD, which lets
     31     you control the screen dimensions, appearance, and so on. You can also specify the emulated SD
     32     card to use with the AVD.</li>
     33 
     34     <li>A dedicated storage area on your development machine: the device's user data (installed
     35     applications, settings, and so on) and emulated SD card are stored in this area.</li>
     36   </ul>
     37 
     38   <p>You can create as many AVDs as you need, based on the types of device you want to model. 
     39   To thoroughly test your application, you should create an AVD for each general device configuration
     40   (for example, different screen sizes and platform versions) with which your application is compatible
     41   and test your application on each one.</p>
     42 
     43   <p>Keep these points in mind when you are selecting a system image target for your AVD:</p>
     44 
     45   <ul>
     46     <li>The API Level of the target is important, because your application will not be able to run
     47     on a system image whose API Level is less than that required by your application, as specified
     48     in the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">
     49     <code>minSdkVersion</code></a> attribute of the application's manifest file. For more
     50     information about the relationship between system API Level and application
     51     <code>minSdkVersion</code>, see <a href=
     52     "{@docRoot}tools/publishing/versioning.html">Specifying Minimum System API Version</a>.</li>
     53 
     54     <li>You should create at least one AVD that uses a target whose API Level is greater than that required
     55     by your application, because it allows you to test the
     56     forward-compatibility of your application. Forward-compatibility testing ensures that, when
     57     users who have downloaded your application receive a system update, your application will
     58     continue to function normally.</li>
     59 
     60     <li>If your application declares a 
     61     <a href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code>uses-library</code></a>
     62     element in its manifest file, the application can only run on a system image in which that external
     63     library is present. If you want to run your application on an emulator, create an AVD that
     64     includes the required library. Usually, you must create such an AVD using an Add-on component for the
     65     AVD's platform (for example, the Google APIs Add-on contains the Google Maps library).</li>
     66   </ul>
     67 
     68   <p>To learn how to manage AVDs using a graphical tool, read <a href=
     69   "{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD Manager</a>. To
     70 learn how to manage AVDs on the command line, read
     71   <a href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs
     72   from the Command Line</a>.</p>
     73 
     74 
     75 
     76 
     77 
     78 
     79