3

VS code and Android Studio is recognizing my connected android device. My device is showing up on file explorer though. I have turned on USB debugging from settings too.

enter image description here

Below is the result of flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.22000.493], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.64.2)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

What I have tried

https://github.com/Dart-Code/Dart-Code/issues/1634#issuecomment-485071966 https://developer.android.com/studio/run/oem-usb#Win10

7 Answers 7

11

After I set up Flutter and got flutter doctor running, I plugged in my Android phone. Neither flutter doctor or VS Code could detect it!

I already turned on Developer Options and USB debugging “File sharing”.

Developer Options > Select USB Configuration > Change it from “File Transfer” (default option) to Charging” The phone will ask if you want to always allow USB debugging from this device.

Say yes.

After that, VS Code was able to detect my Android phone, and I was able to run my app on it!

Sign up to request clarification or add additional context in comments.

1 Comment

For some weird reason this worked for me, but only after running Android Studio. VSCode wasn't finding any device until then. Now it does. I guess Android Studio did recognize it and installed something necessary for VSCode to find the device.
3

Please check you follow the proper steps to connect your Device.

  1. Turn on the developer options on your device
  2. Enable USB debugging on your Device
  3. When connecting the device to your Machine don't select charge only mode
  4. Accept Certificate in certificate popup for the machine after connecting the device

Comments

1

Please check link below. It might solve your problem of not showing devices (Message "flutter run: No connected devices"):- Message "flutter run: No connected devices"

Comments

1

Go to your terminal and run this command.

flutter devices

This will verify if flutter has recognized your device or not.

Also check and verify this.

flutter config --android-sdk ANDROID_SDK_PATH

At last you can check this link - https://docs.flutter.dev/get-started/install/macos#set-up-your-android-device

Comments

0

Once check the output of the command

adb devices

If the list is empty then the system has recognized your device as a storage device. Then you need to install android SDK from the Android Studio IDE and try again.

Comments

0

just change the USB option to photo transfer it worked for me

Comments

0

Also if nothing helps - try to change usb cable. For me with my Mac it helps if no device shown/it disappears from time to time.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.