Android Studios error : Unable to locate adb location

巧了我就是萌 提交于 2020-06-17 15:51:15

问题


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.

  1. AVG Antivirus I added the adb.exe path in the exception section of my antivirus. AVG Antivirus

  2. 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

  3. 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 😊


回答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.



来源:https://stackoverflow.com/questions/62234109/android-studios-error-unable-to-locate-adb-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!