Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Android Emulator Can’t Find AVD

DZone's Guide to

Android Emulator Can’t Find AVD

· Java Zone
Free Resource

Find your next Integration job at DZone Jobs. See jobs focused on integration, or create your profile and have the employers come to you!

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/

 

Find your next Integration job at DZone Jobs. See jobs focused on integration, or create your profile and have the employers come to you!

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}