chetan
chetan

Reputation: 51

Not able to launch android emulator

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

Upvotes: 5

Views: 12675

Answers (7)

Deepank
Deepank

Reputation: 1

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

:

Upvotes: 0

sultanmyrza
sultanmyrza

Reputation: 5484

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

Upvotes: 1

Rajat Vishnoi
Rajat Vishnoi

Reputation: 1

Try this It worked for me...

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

Type command emulator @youremulatorname 

For more Check out this Link

Upvotes: 0

Fakhar Iqbal
Fakhar Iqbal

Reputation: 4069

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) 

Upvotes: 8

Zwiebel
Zwiebel

Reputation: 1615

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.

Upvotes: 2

Felix
Felix

Reputation: 89626

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.

Upvotes: 1

arunkumar
arunkumar

Reputation: 34103

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.

Upvotes: 0

Related Questions