Matthew Turland began working with PHP in 2002 and has since gone on to author php|architect's "Web Scraping with PHP," co-author SitePoint's "PHP Master: Write Cutting-Edge Code," and speak at a number of PHP conferences. In his spare time, he leads development on the Phergie project and serves as an organizer for the Acadiana Open Source Group. Matthew is a DZone MVB and is not an employee of DZone and has posted 15 posts at DZone. You can read more from them at their website. View Full User Profile

Android Emulator Can’t Find AVD

08.11.2011
| 5460 views |
  • submit to reddit

I ran into a small gotcha recently when creating a new Android project in Eclipse. The first time I went to run it on an AVD, I received an error in the console output:

[2011-08-09 19:14:46 - Emulator] emulator: ERROR: unknown virtual device name: 'avd'
[2011-08-09 19:14:46 - Emulator] emulator: could not find virtual device named 'avd'

The first few results in Google didn’t turn up any useful information. The culprit turned out to be buried in the Eclipse UI.

  1. If the Package Explorer view isn’t already active, activate it by selecting Window > Show View > Package Explorer.
  2. In the Package Explorer view, right-click on your project and select Run As > Run Configurations.
  3. In the right half of the Run Configurations window, select the small Target tab.
  4. On the far right side of the window, use the scrollbar to scroll to the bottom of the Target tab’s contents.
  5. Find the text box labeled Additional Emulator Command Line Options. It probably has a value like this: -cpu-delay 0 -no-boot-anim -avd avd.
  6. Change the value of the text box to look like -cpu-delay 0 -no-boot-anim -avd AVD Name where AVD Name (which defaults to simply avd) is the name of the AVD you’ve created for this project. In other words, if you open the Android SDK and AVD Manager window (Window > Android SDK and AVD Manager), the value you should use in place of AVD Name within this text box is the same value that appears in the AVD Name column of that window for the desired AVD. So, if your AVD is named MyProjectAVD, the value of the text box should be -cpu-delay 0 -no-boot-anim -avd MyProjectAVD.

 

From http://matthewturland.com/2011/08/09/android-emulator-cant-find-avd/

 

Published at DZone with permission of Matthew Turland, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags: