Error: Could not automatically detect an ADB binary. Some emulator functionality will not work until a custom path to ADB is added in the extended…

Viewed 38714

I'm getting an error message in Android Studio with adb:

Could not automatically detect an ADB binary. Some emulator functionality will not work until a custom path to ADB is added in the extended settings page.

Screenshot showing the error message

Note that I have adb as part of the development tools and have set variable path, have tested in cmd and it's functional.

What am I missing here? Do I have to set some path to adb in Android Studio as well?

I'm using Android Studio 2.3.3.

8 Answers

In my case Macbook M1, I just tried following steps:

  • Android Studio: Menu -> Tools -> SDK Manager select SDK Tools Tab and Uncheck -> Android SDK Platform-Tools
  • Close Android Studio, close simulator
  • Start Android Studio and Now Select/Check -> Android SDK Platform-Tools
  • Open Simulator and build the Application ( Working fine )

This is mostly because of Windows antivirus. To solve it follow these steps:

Click the Start button.

Type “Windows Security”.

Click on “Virus and threat protection”.

Click on “Manage settings” under “Virus & threat protection settings”.

Scroll down if needed, and then click on “Add or remove exclusions”.

enter image description here

enter image description here

Press the + button, choose "process" and add each of these processes.

1.Gradle cache : %USERPROFILE%.gradle

2.Android Studio projects : %USERPROFILE%\AndroidStudioProjects

3.Android SDK : %USERPROFILE%\AppData\Local\Android\SDK

For example this is how you add the first one.Just choose "Process" and copy and paste this and then "Add".

enter image description here

After adding all three of them to the exclusion, just run your app again and it will be fine.

Open Android Studio Go to: Menu -> Tools -> SDK Manager Click on SDK Tools Tab, Now Check on - "Android SDK Platform-Tools" Click on OK to install. Now you should see "Virtual Device" under Device Connector (just next to build icon) Run your App and it should start in Native M1 Android Emulator.

thank you @FARAZ, worked for me on my M1 as well!

i'm using VSCode and after unselected/selecting the Android SDK Platform-Tools I was able to go into the Emulator on VSCode and it prompted me to install some Xcode stuff on the android emulator and then it worked!

i also got this error, re-installing the sdk-platform-tools isn't a quick solution,...finally fix it by switching off the emulator manually then switching it back on from android studio avd manager

Adb Error fix

On my MacBook Pro M1 I had to either install a new emulator or wipe data/cold boot every time. I’m sure there’s a better solution but this is a quick fix

for me go to the avd manager and do cold boot and run the app. it works for me.

Related