5

When I run my hello world application, the android emulator fails to launch.Even when i am creating a new emulator it fails to launch giving me the following error.

[2011-08-09 17:03:10 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
[2011-08-09 17:03:10 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.
[2011-08-09 17:03:10 - Emulator] please use -help for more information
Felix
  • 86,568
  • 42
  • 148
  • 166
chetan
  • 51
  • 1
  • 1
  • 2
  • Your question already answered [here][1] [1]: http://stackoverflow.com/questions/6603194/starting-the-android-emulator-in-sdk-tools-revision-12 – Aboalnaga Apr 27 '14 at 00:31

6 Answers6

6

First of all you need to check are you in correct folder?

$...local\Android\sdk\tools\emulator -list-avds

If so it will show you list of emulators that you have in your Android studio you are on right track Last part for launching an emulator

local\Android\sdk\tools\emulator -avd Nexus_5X(name of your emulator you want to open) 
Faakhir
  • 3,546
  • 36
  • 34
2

The problem is, that you have specified your SDK in a file what has space, in its name For example: Android SDK You need to change it to something what hasn't got space in its name.

Hope it helps.

Or if you specified it in the Program Files use it: Progra~1 instead of Program Files.

Zwiebel
  • 1,605
  • 3
  • 21
  • 37
  • I would like to add this link. You'll need to change the android path in the preferences. http://stackoverflow.com/questions/6603194/starting-the-android-emulator-in-sdk-tools-revision-12 – Otra Aug 09 '11 at 14:16
1

The tricky part is finding name @foo

  1. to find exact name of emulator run android command line emulator -list-avds aka ~/Library/Android/sdk/tools/emulator -list-avds 2.it will show you emulator names but emulator names that you pass to command line

enter image description here

bonus: you probably will get PANIC error in that case you need to add ANDROID_PATH read more here https://stackoverflow.com/a/49511666/6133329

sultanmyrza
  • 3,093
  • 23
  • 19
1

You are not specifying what AVD to launch. Please read the SDK docs in full, they will show you how to do this.

Tip: Launch the "android.exe" (I think, I use Linux where it's simply "android") app instead, create an AVD and launch it, all from the graphical interface.

Felix
  • 86,568
  • 42
  • 148
  • 166
0

Try this It worked for me...

emulator @avd_name [ {-option [value]} … ]

Type command emulator @youremulatorname 

For more Check out this Link

Jason
  • 1,759
  • 1
  • 19
  • 25
0

On windows don't install the Android SDK to a path with spaces in it like C:\Program Files\AndroidSDK. Instead install it to C:\AndroidSDK\ or something like that.

arunkumar
  • 30,367
  • 4
  • 31
  • 47