1

I am not able to run my project using android studio after an update from 2.2 to 2.3. I always getting an error like "unable to locate adb" while i try to run my project.

Shoot me a proper solution to fix this. I tried many ways but i couldn't solve this.

Bakya
  • 427
  • 3
  • 7
  • 18

9 Answers9

12

I was using Avast and found out that the adb.exe was in the virus chest and i simply restored it as an exclusion, now it worked perfectly. Don't keep the Android Studio outdated, Thanks Avast Virus Chest


Couple of updates to this working solution

1) Virus Chest Image enter image description here

2) Restore adb from the virus chest & also add android-studio folder under exclusions to avoid the issue in future enter image description here

Ajay B
  • 746
  • 9
  • 19
Himagaran
  • 312
  • 2
  • 14
4

Also had this error. It turns out my anti-virus had quarantined the adb. So i simply went to the virus chest and added adb to the list of antivirus exclusions. It worked perfectly after that.

Pamela Sillah
  • 193
  • 4
  • 17
3

Adb.exe is missing in the studio path. I just added the adb.exe file into the path and it solved my issue. I dont know whether it will work on all situations. But it has worked for me.

Thanks for all your directives

Bakya
  • 427
  • 3
  • 7
  • 18
  • http://stackoverflow.com/questions/42902260/how-to-solve-unable-to-locate-adbillegalargumentexception-in-android-studio/43201292#43201292 – Sandeep Sankla Apr 04 '17 at 07:51
  • in my case, adb.exe was missing in e.g "/C:\Android\platform-tools". I just download it from the official link "https://developer.android.com/studio/releases/platform-tools" and copy it to the said folder and the problem resolved. – Rashid Kamal Dec 28 '19 at 17:59
2

(I am using Android Studio 3.0.1)

  1. I downloaded "SDK Platform-Tools" from
    https://developer.android.com/studio/releases/platform-tools
  2. Copied 'adb.exe' to C:\Users\user\AppData\Local\Android\Sdk\platform-tools.
  3. Then I got no errors when running the app.

  4. I also added C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe to the exception list of my anti-virus tool

Subhashi
  • 4,145
  • 1
  • 23
  • 22
1

I was also facing same problem, but I resolved it I am using android studio 2.3 open command prompt and set the path to platform tools i.e. "C:\Users\AppData\Local\Android\sdk\platform-tools"

then write adb.exe as shown

C:\Users\sandeep\AppData\Local\Android\sdk\platform-tools>adb.exe

then restart your studio It will working fine

Sandeep Sankla
  • 1,250
  • 12
  • 21
1

I have been into the same problem a few hours ago, but this is how i have been able to resolve it.

Download ADB from this Link: http://adbshell.com/downloads Choose out this option: ADB Kits (525 KB)(adb.exe AdbWinApi.dll AdbWinUsbApi.dll)

Extract all the 3 files you have downloaded from the extract. Then paste the 3files in your SDK=>platform-tools folder. I that exactly worked for me. All the best.

Anatoli LK
  • 21
  • 5
0

Goto inside the Tools:

Tools --> Android --> SDK Manager --> Launch Standalone Sdk manager

Thre you can see which platform tools are missing. Just install that and your adb will works.

Harshad Chhaiya
  • 125
  • 2
  • 11
0

I was also facing same problem, but I resolved it I am using android studio 2.3 open command prompt and set the path to platform tools i.e. "C:\Users\\AppData\Local\Android\sdk\platform-tools"

then write adb.exe as shown

C:\Users\sandeep\AppData\Local\Android\sdk\platform-tools>adb.exe

then restart your studio It will working fine.

Sandeep Sankla
  • 1,250
  • 12
  • 21
-1

open Studio settings-->System settings --> Android SDK --> select SDK tool tab -->> select "Android SDK platform tool" and install

Abhishek
  • 51
  • 2
  • 9