No Devices in VS Code - Flutter
Asked Answered
E

3

7

I'm new to flutter app devleopment. I've installed Flutter SDK and I'm using VS Code. I want to test my demo app in my android device, I've enabled Developer mode and USB debugging option in my android device. In the status bar, VS Code shows, No Device though I connected via USB cable. How to resolve this problem? Do we need Android SDK for this?

Screenshot

Electrothermics answered 28/4, 2020 at 8:42 Comment(1)
You need to do debug configuration on your mobileFilament
H
2

connect your phone then you need to run adb devices on command line while your phone is unlocked it will show allow debug alert on phone accept and it will show

you can download command line tools and use sdk manager if you don't have android sdk from android studio page

Hilltop answered 28/4, 2020 at 9:15 Comment(5)
Thank you @Ahmed D. Sherif, Now I can see my device name.. But while executing flutter run it throws error like this... Unable to locate a development device; please run 'flutter doctor' for information about installing additional componentsElectrothermics
But flutter doctor shows... [X] Android toolchain - develop for Android devices X Unable to locate Android SDK. Install Android Studio from: developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location. You may also want to add it to your PATH environment variable. [!] Android Studio (not installed) [√] VS Code (version 1.44.2) [√] Connected device (1 available)Electrothermics
the message is very clear you must have android studio from developer.android.com/studio/index.html installed and setup the sdk after installHilltop
Can we download Android sdk alone?Electrothermics
i edited my answer to show how but this method is hardHilltop
B
1

Run VS Code as administrator.

Check the result from terminal output: flutter doctor

Ballew answered 22/5, 2021 at 5:10 Comment(1)
naah. its still missing from my bottom bar. there's no device optionLum
C
0

it's just a small technical error, just open cmd/terminal then enter the flutter doctor command then click on the bottom bar in the device section in vscode (usually it says no device) and your error should be resolved and all your devices will be displayed successfully

Chilcote answered 3/9 at 11:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.