Setting up an Android Emulator



To see this application in a running state, you need to know how to set up an emulator through the various different launch configurations. First, you need to create an Android Virtual Device (AVD), also known as an emulator. An AVD is a virtual Android device that looks, acts, walks, and talks (well, maybe not walks and talks) just like a real Android device. AVDs can be configured to run any particular version of Android as long as the SDK for that version is downloaded and installed. It’s time to get reacquainted with your old buddy the Android SDK and AVD Manager. Follow these steps to create your first AVD:


1. To open the Android SDK and AVD Manager


When the Android SDK and AVD Manager is open, you should see a dialog box.  The Android SDK and AVD Manager icon on the Eclipse toolbar. The SDK/AVD Manager, the Android SDK and AVD Manager dialog box.


 


2. Click the New button.


The Create New Android Virtual Device (AVD) dialog box opens, The Create New Android Virtual Device (AVD) dialog box.


 


3. For this AVD, in the Name field, type 2_2_Default_HVGA.


For more information on naming your AVDs, see the nearby sidebar “AVD nomenclature.”


 


4. In the Target box, select Android 2.2 — API Level 8.


 


5. In the SD Card section, leave the fields blank.


You have no use for an SD Card in your application. You would use the SD Card option if you needed to save data to the SD Card. If you want to have an emulator in the future, insert the size of the SD Card in megabytes (MB) that you would like to have created for you. At that time, an emulated SD Card will be created and dropped in your local file system.


 


6. Leave the Skin option set to Default (HVGA).


 


7. Don’t select any new features in the Hardware section.


The Hardware section outlines the hardware features your AVD should emulate. You don’t need any extra hardware configuration for your first application.


 


8. Click the Create AVD button.


The recently created AVD in the Android SDK and AVD Manager dialog box.


 


9. Close the Android SDK and AVD Manager dialog box.


 


You may receive an error message after you create your AVD. This message may say Android requires .class compatibility set to 5.0. Please fix project properties. If this happens to you, you can fix it by right-clicking the project in Eclipse and choosing Android Tools➪Fix Project Properties from the context menu.


You’ve created your first Android virtual device. Congratulations!

Editor: ankita Added on: 2013-03-01 11:25:54 Total View:364







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---