While launching AVD in emulator showing this "Unable to locate adb"
Asked Answered
C

2

7

error

It was working before but after 4.0 update it's not working.

Errors are

08:55 AM Emulator: C:\Users\Asus\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe' 08:55 AM Emulator: deleteSnapshot: for default_boot

and yes I don't have antivirus.

Completion answered 4/6, 2020 at 3:45 Comment(0)
M
10

Reinstalling Android SDK after deleting the platform-tools dir doesn't work for everyone follow these steps, they may help you:

  1. In Android Studio go to File>Project Structure (Ctrl + Alt + Shift + S in windows);

  2. The Project Settings>Project>Project SDK must have a valid Android SDK selected;

  3. Start the adb-server daemon with adb.exe start-server (this is to avoid the: adb wasn't listening on port XXXX error message);

  4. Emulate a new device (if you've added %ANDROID_HOME%\emulator to your path run emulator.exe -list-avds select one of the virtual devices from the list and run emulator.exe -avd , if not find out your Android SDK path and change the previous commands accordingly);

  5. check if the adb daemon is running and recognizes the emulated device: open cmd prompt, run %ANDROID_HOME%\platform-tools\adb.exe devices and it should list the device you have on at the moment.

Mislead answered 25/1, 2021 at 12:39 Comment(1)
For me under Project Settings>Project>Project SDK was not set.Krishnakrishnah
P
0
  1. on your android studio go to Tools > android > SDK Manager.
  2. view android SDK location (this will show you your sdk path)
  3. navigate to file explorer on your system, and locate the file path, this should be found something like c://Users/johndoe/AppData/local/android (you can now see the sdk.)
  4. check the platform tools folder and see if you would see anything like adb.exe (it should be missing probably because it was corrupted and your antivirus or windows defender has quarantined it)
  5. delete the platform tools folder
  6. go back to android studio and from where you left off navigate to sdk tools (this should be right under android sdk location)
  7. uncheck android sdk platform-tools and select ok. (this will uninstall the platform tools from your ide) wait till it is done and then your gradle will sync.
  8. after sync is complete, go back and check the box of android sdk platform-tools (this will install a fresh one with new adb.exe) wait till it is done and sync project and then you are good to go.
Phenyl answered 4/6, 2020 at 4:16 Comment(3)
In "c://Users/johndoe/AppData/local/android". Is don't have that AppData file, now what i doCompletion
Locate your SDK in your PC, and follow stepsPhenyl
hay, i'm still geting this error :- {16:22 Emulator: C:\Users\Asus\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe' 16:22 Emulator: deleteSnapshot: for default_boot}Completion

© 2022 - 2024 — McMap. All rights reserved.