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

18,844

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.

Share:
18,844
Admin
Author by

Admin

Updated on August 06, 2022

Comments

  • Admin
    Admin over 1 year

    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.

  • Admin
    Admin almost 4 years
    In "c://Users/johndoe/AppData/local/android". Is don't have that AppData file, now what i do
  • Gurarshdeep Singh
    Gurarshdeep Singh almost 4 years
    Locate your SDK in your PC, and follow steps
  • Admin
    Admin almost 4 years
    hay, i'm still geting this error :- {16:22 Emulator: C:\Users\Asus\AppData\Local\Android\Sdk\emulator\qemu\window‌​s-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}
  • DrP3pp3r
    DrP3pp3r almost 3 years
    For me under Project Settings>Project>Project SDK was not set.