How do I connect an Android phone to Visual Studio Code?
5,173
Here is one of the workaround:
Open Android Studio then click on SDK Manager (down-pointing arrow)
This should open a new box with your Android SDK Location at the top. It should look like this:
/Users/username/Library/Android/sdk
Configure the path of android-sdk
flutter config --android-sdk /Users/username/Library/Android/sdk
Add android-license to Flutter
flutter doctor --android-licenses
Then, you can run flutter doctor
to verify,
Author by
Logan Blackisle
Updated on December 24, 2022Comments
-
Logan Blackisle over 1 year
VSCode shows 'No Device' in the status bar, while Android Studio has no problems connecting to device over usb, or creating a virtual device.
When I run flutter doctor in VSCode terminal, I get:
When I click the 'No Device' (as a shortcut to Flutter: Launch Emulator), I get the error message
avdmanager is missing from the Android SDK
I've tried:
- updating my PATH variables - I was a bit confused as to which folder I should point to, so I tried every single one I found mention of:
- C:\Users\USERNAME\AppData\Local\Android\Sdk;
- C:\Flutter\flutter\bin;
- C:\Flutter\flutter\bin\cache\dart-sdk\bin;
- updating "dart.flutterSdkPath" in VSCode
- specifying ADB location --> C:/Users/USERNAME/AppData/Local/Android/Sdk/platform-tools/adb.exe
- uninstalling and reinstalling Android Studio
- deleting, downloading, and re-unzipping Android/Sdk/platform-tools
And nothing makes any change.
-
CoderUni over 3 years"avdmanager is missing from the Android SDK" your problem is with android sdk. try uninstalling and resinstlling it. You should also download the avd in android studio
-
secret over 3 yearsMay you try Genymotion?
-
Vinamra Jaiswal over 3 yearsrecheck if usb debugging has been enabled or not?
-
Logan Blackisle over 3 years@VinamraJaiswal USB debugging has been enabled - no change (VSCode refuses to see any devices regardless if that device is an actual connected device, or an emulated one through Android Studio).
-
Logan Blackisle over 3 years@Uni I already tried deleting, downloading, and re-unzipping Android/Sdk/platform-tools, shouldn't that take care of it if that was the problem?
-
GrahamD over 3 yearsMaybe this answer can help? stackoverflow.com/questions/49115840/…
-
Muhammad Qasim over 2 yearsI've done all this and Flutter cli can detect android devices/emulators but not the VS Code extension :( It just keep giving error
avdmanager is missing from the Android SDK