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
  • 88,392
  • 43
  • 149
  • 167
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

7 Answers7

7

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) 
Fakhar
  • 3,946
  • 39
  • 35
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
  • 4
  • 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
  • 4,551
  • 1
  • 30
  • 24
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
  • 88,392
  • 43
  • 149
  • 167
0

Try this It worked for me...

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

Type command emulator @youremulatorname 

For more Check out this Link

Jason
  • 2,493
  • 2
  • 27
  • 27
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
  • 32,803
  • 4
  • 32
  • 47
0

For Windows

Check whether you have an emulator on your PC. If it is there add the path below to the environment variable C:\Users%username%\AppData\Local\Android\Sdk\emulator and remove C:\Users\deepank\AppData\Local\Android\Sdk\tools

:

Deepank
  • 1
  • 1