Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 261
Norbert Avatar asked Sep 05 '18 22:09

Norbert


People also ask

How do I link my mobile emulator to VS code?

Step 1: Go to the Extensions button on VSCode and search for Android and iOS Emulator and install it. Note: Change the Emulator path windows address based on the location of the emulator file on your PC but make the Emulator path as default it would be given as default by the VSCode.

Can VSCode run Android emulator?

If you're working with Flutter or React Native, you can launch an iOS Simulator or an Android Emulator using VS Code (Visual Studio Code). 1. Go to View > Command Palette… or hit Command + Shift + P (macOS) or Ctrl + Shift + P (Windows).

How do I add an emulator to Visual Studio?

Just open up the Visual Studio Emulator for Android entry in your Start Menu, hit play, and the emulator is ready to debug from any IDE. Download the standalone emulator today!

Why is Android Studio not detecting my phone?

If your device is not correctly detected in RAD Studio or in the system Device Manager, check the following: Ensure that your Android device is unlocked and not sleeping while connected via USB. Set the appropriate option in Settings or Developer Options. Make sure your Android device is enabled for USB debugging.


Video Answer


3 Answers

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

  1. Developer Mode
  2. USB Debugging Mode
like image 74
paul Avatar answered Nov 14 '22 22:11

paul


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

like image 31
Danny Tuppeny Avatar answered Nov 14 '22 22:11

Danny Tuppeny


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

like image 37
Sandun Sameera Avatar answered Nov 15 '22 00:11

Sandun Sameera