Visual studio code can't detect emulator device or phone connected

Viewed 23894

I was running my app with vscode using Android emulator or my phone, however all of a sudden vscode could not identify any device or emulator that I connect (no devices). phone is in debug mode or even the android emulator. Also When I try starting the emulator I get this warning enter image description here

4 Answers

When using an actual device with VSCode/Android Studio, you must switch on both:

  1. Developer Mode
  2. USB Debugging Mode

Seems like adb can't be found. Have you updated or moved the (Android) SDK recently?

You may want to check your platform-tools folder in your Android SDK and if necessary, download the tools again (see this answer).

Happened me sometimes. problem was avast antivirus software it puts that adb file to virus chest

There are various reason of happening this but one common solution to this problem is go and open platform-tools folder and check for adb.exe if it exists there copy the link from above address bar and put it into environment variable path that's it. By default platform-tools folder comes with sdk installtation but in case if you don't have one then you can download it from below link https://developer.android.com/studio/releases/platform-tools [open this image to see the path variable][1] [1]: https://i.stack.imgur.com/dttn0.png

Related