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?
No Devices in VS Code - Flutter
You need to do debug configuration on your mobile –
Filament
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
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 components –
Electrothermics
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 install –
Hilltop
Can we download Android sdk alone? –
Electrothermics
i edited my answer to show how but this method is hard –
Hilltop
Run VS Code as administrator.
Check the result from terminal output: flutter doctor
naah. its still missing from my bottom bar. there's no device option –
Lum
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
© 2022 - 2024 — McMap. All rights reserved.