-1

When I try to open emulator in Android studio. It gives me "unable to find adb" error also I tried to launch by cmd which is

cd C:\Users\EFE\Desktop\sdk\tools
emulator.exe

It gives me

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

I deleted my SDK Platform-Tools and reinstall it. I don't have Android files in C:\Users\Username\AppData\Local\Android\Sdk\platform-tools to fix it. In my case it is C:\Users\EFE\AppData\Local\Android Open Source Project\Emulator and it doesn't have any platform-tools. I used the emulator yesterday perfectly. I think I played a game that has a protection program. I disabled the protection program but didn't solve my problem.

Reinstall the android studio and flutter but still have the same problem. When I try to open emulator via AVD manager. It gives me "unable to locate adb" and trying to open emulator but just black screen.

Efe
  • 88
  • 1
  • 7

3 Answers3

1

option 1:

emulator -avd Pixel_2_64

option 2:

emulator "@Pixel_2_64"

Have to use the quotation marks or use the avd flag.

@ is used for argument splatting in PowerShell, hence the need for quoting; alternatively, you could have -escaped the @ (emulator @Pixel_2_64)

Ashutosh Patole
  • 926
  • 1
  • 7
  • 23
0

Try to open your emulator width :

emulator -avd <name>

If not working, I create a .bat file on github for you : https://github.com/samuel3105/Android-AVD-windows. You just have to launch the .bat file, type 1 to show your emulator, and enter the name of your emulator.

samuel
  • 477
  • 7
  • 21
0

You can try to wipe the data of the particular device.

Go to -> Android Studio -> Tools -> AVD Manager -> [Select the down triangle on your chosen device] -> Wipe data.

Now retry.

https://stackoverflow.com/a/65814027/11283638