I read the answers "unable to locate adb" using Android Studio and Error:Unable to locate adb within SDK in Android Studio and it didn\'t solve my problem.
For me (Android-Studio on Ubuntu-18.04), it was caused by wrong Android Project SDK with emulators's API versions.
To correct it, first go to File->Settings->Appearance & Behavior->System Settings->Android SDK, in which check SDK Platforms->API Level to see what (API versions) have been installed, if none, install one.
Then, go to Project Structure->Module->Properties and configure Compile SDK Version and Build Tool Version to be consistent with what have been installed.
In the "Advanced Settings" section of your Android device; When "Verify applications via USB = Enable" and "Select USB Configuration = MIDI", the connection between the computer and the android device is provided. The result is run!
A couple of days after posting the above solution, the problem returned on my Windows system.
Finally after several hours of investigation I think I have another solution for everyone having issues with AVD Manager "Unable to locate adb".
I know we have the setting for the SDK in File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK. This it seems is not enough! It appears that Android Studio (at least the new version 4) does not give projects a default SDK, despite the above setting.
So, you also (for each project) need to go to File -> Project Structure -> Project Settings -> Project, and select the Project SDK, which is set to [No SDK] by default.
If there's nothing in the drop-down box, then select New, select Android SDK, and navigate to your Android SDK location (normally C:\Users[username]\AppData\Local\Android\Sdk on Windows). You will then be able to select the Android API xx Platform. You now should not get this annoying adb error.
HTH
My little contribution. I have 10.0 (R) and 7.1.1 (Nougat) SDKs installed. Also, installed and uninstalled many times my Android SDK Platform-Tools. Now it is at version 30.0.4. And I made the Edit to SDK Location. Nothing worked. So I noticed I had another directory at /home//Android/Sdk/platforms. It was 9.0 (Pie). It was half installed (maybe some error in the past). So, I did installed completely. It worked. :)
I started getting this error after updating Android Studio from version 3.6.3 to 4.0. It didn't stop the emulator working, but it was vaguely annoying.
I checked that adb.exe was in the folder C:\Users[username]\AppData\Local\Android\Sdk\platform-tools. I also ran it in a command-line to prove that the exe worked OK.
Finally after a bit of a struggle I found a solution:
Start the SDK Manager, File menu -> Settings -> Appearance & Behavior -> System Settings -> Android SDK, SDK Tools tab (Or click the cube with blue down arrow icon in the toolbar).
Firstly I updated the Android SDK Platform-Tools (now v30.0.2). This didn't fix the problem. I also tried manually deleting the platform tools folder and reinstalling.
Eventually I decided to click the "Edit" link next to the "Android SDK Location" box. This opens a new dialog for SDK Components Setup. How well hidden is that?!?! I had always assumed it was to edit the SDK path!
You should now see that Android SDK - (installed) has a tick in the checkbox, as do any SDK Platforms you have. Click on the Next button and your SDK will update. Problem solved.
HTH
im using windows 8 and i just got the same problem, i solved this by adding the adb.exe in the path variable.