Mike Ike
Mike Ike

Reputation: 79

How do I fix "emulator: ERROR: No AVD specified. Use '@foo' or '-avd foo' to launch a virtual device named 'foo'"

So I currently have one AVD that I created with android studio for the Pixel 2 and I decided to create another one for the Pixel 3, which I named "react". After I tried opening "react" with the emulator -react command in the Power terminal, I received the following error:emulator: ERROR: No AVD specified. Use '@foo' or '-avd foo' to launch a virtual device named 'foo' At first I thought that the problem might be that I needed to add the location of this new emulator to the PATH in the control panel, but I already have a path titled: C:\Users\Ahers\AppData\Local\Android\Sdk\emulator so I don't think that's the issue. I'm not entirely sure what to do so any feedback would be very helpful.

Upvotes: 2

Views: 12594

Answers (2)

banditKing
banditKing

Reputation: 9579

on a mac Go to :

/Users/<username>/Library/Android/sdk/emulator

Do a ls -la there: You should see the emulator command there.

run the following there:

emulator -list-avds

This shows all the emulators available to run on. Pick one.

For me it was like so:

Pixel_8_Pro_API_34

So I ran this command there:

emulator -avd Pixel_8_Pro_API_34

Everything worked

Upvotes: 0

xnng
xnng

Reputation: 39

react is your avd name, so you can use this command to start it:

emulator -avd react

or

emulator @react

Upvotes: 3

Related Questions