Friday, December 10, 2010

Creating Android Virtual Device (AVD) in Eclipse

     Creating an Android Virtual Device is mandatory in order to test the working of your code in the Emulator. AVD specifies the version of Android that you want to test your project with. And you can create as many AVDs you want in order to test your project with different Android Platforms.


      Creating an Android Virtual Device can be done from command prompt or from Eclipse.  I prefer using Eclipse. If you do not have Eclipse, you can download from here. The steps to create an Android Virtual Device for Android 2.1 (Eclair) are as follows.


Step 1: Make sure that you have Android SDK installed and configured in your Eclipse. 
Step 2: Now go to Window -> Android SDK and AVD Manager in Eclipse. 



Step 3: NameEnter a valid name for the Virtual Device (virtual_2.1)
Step 4: Target - Select the target device (Android 2.1)
Step 5: SD Card - If you want to create a SD card for the device, enter the size (512 MiB) or you can leave it blank if you don't want a SD card.
Step 6: Skin - Select the Resolution for the Screen from listbox or enter a custom resolution. 
Step 7: Hardware - Select the Advanced Options here. Click on New button add support for Accelerometer, Camera, GPS, Trackball, Keyboard etc. By default, these hardware requirements are disabled. 
Step 8: Click Create AVD button 


             Now the AVD is created and it will be listed in Android SDK and AVD Manager window. Once created, the configurations cannot be edited. If you want to edit or any additional configuration, you need to delete the existing AVD and create a new one again. Your Comments are appreciated since this is my first post.

1 comment: