Friday, March 2, 2012

Setting Up An Emulator

While developing, it is a good idea to test your application frequently to assure it is behaving as you expect. There are two ways to run/test Android applications.

Using a Device:

  1. Connect your Android device to your computer
  2. Click  Runin Eclipse to test your project

If you don't have an Android device, any applications you create can be ran from an Android Virtual Device (AVD.) The AVD manager comes with the Android SDK and can be found in Eclipse. 

Creating an Emulator


  1. Click the AVD manager icon
  2. Click New. 
  3. Name your emulator according to what version of Android you're developing in. (Ex. em23 if coding for Android 2.3)
  4. Next, select the version of Android under Target. 
  5. The SD Card Size should be 128 MiB 
  6. Snapshot should be enabled. 
  7. Set the device RAM size to 768. 

Emulator Tips:
  • When running your emulator it's a good idea  to run it from the Android SDK folder rather than from Eclipse. 
  • The first time you run your emulator select "Save to Snapshot." Every time after be sure "Save To Snapshot" is not selected and "Launch from Snapshot" is selected. 
  • Running the emulator for the first time can be a painfully slow process, it will get better. 
  • Keep your emulator open while developing to avoid the slow start up. 
  • When you click run it will use the emulator you select. 

No comments:

Post a Comment