Solution 1 :
I’ve been tearing my hair out about this since I updated to v4.0 about an hour ago! 🙂 This is what worked for me in the end (the other solutions about stopping starting adb server etc. just didn’t work at all). YMMV.
Go into SDK manager, and uninstall :
- Android Emulator
- SDK platform tools
- SDK command line tools
Close SDK manager and/or android studio completely.
Make sure the directories for these tools under AppData/ .. /Sdk
have all been removed properly. Just zap them if they haven’t.
Restart Android Studio and re-install all these packages.
I did another stop/restart after this, just to be sure.
Step 3: Profit!
Seems that upgrading the existing packages maybe didn’t work properly, even if AS thought it did.
Still seem to be having issues using the geolocator package now (which was working fine before, so thinking this is setup too), but the emulator is starting OK now with no adb issues.
Solution 2 :
I tried reinstalling Android SDK after deleting the platform-tools dir but with no success. What did work for me were the following steps:
-
In Android Studio go to File > Project Structure (Ctrl + Alt + Shift + S in windows);
-
Under Project Settings>Project>Project SDK must have a valid Android SDK selected;
-
emulate a new device;
-
check if the adb daemon is running and recognizes the emulated device: open cmd prompt, run %ANDROID_HOME%platform-toolsadb.exe devices and it should list the device you have on atm.
Solution 3 :
If you already have installed the Sdk tools at ~/Android/Sdk
, you can add this to your .bashrc
or .zshrc
, alias adb=/home/USER/Android/Sdk/platform-tools/adb
(change USER to your user) and restarting android studio, not invalidate caches/restart but closing it and re-opening it, which should pick the new adb
alias from the shell.
Solution 4 :
The answers didn’t work for me. So I removed/uninstalled everything and install a new android studio.
Problem :
I’m new to Android Studios. After trying to press play on my Pixel 3a device emulator on AVD Manager this pops up. Error Message : Unable to locate adb
However my emulator runs just fine, I just can’t run the “flutter run” command and the flutter app on the emulator. Emulator
I’m on Android Studios 4.0. Here’s what I’ve tried so far to solve this issue.
-
AVG Antivirus
I added the adb.exe path in the exception section of my antivirus. AVG Antivirus -
Android SDK Location
I went to SDK Manager, pressed edit beside the Android SDK Location box. All SDK components are already updated. Android SDK LocationUpdated SDK Components -
SDK Platform Tools
I unchecked and checked SDK Platform Tools on SDK Tools.
Platform Tools
I’ve tried everything but still no luck. It’s been a week and it’s getting really annoying. I really do hope someone can help me. Really much appreciate it. Thanks in advance
Comments
Comment posted by Javeed Ishaq
I also gone into the same issue and fixed by manually downloading command-line tools from android studio download page and placing into Android/Sdk floder inside Home on my Linux ubuntu you please check into you Android/Sdk Folder if the command line tools folder exists