<no devices>devices not detected in VSCode & android studio using Flutter

Viewed 32

How to fix device not detected?

    adb devices
    List of devices attached
    42001d159ac454  device


    flutter doctor 
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.3.2, on Ubuntu 20.04.2 LTS 5.4.0-124-generic,
        locale en_US.UTF-8)
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    [✓] Android Studio (version 2021.2)
    [✓] VS Code
    [✓] Connected device (1 available)
    [✓] HTTP Host Availability
    
    • No issues found!

Everything is normal when checked by flutter doctor.

android studio vs code

2 Answers

If you work on emulator in android studio, wiping data solves the problem

Export sdk path to environment variables

export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
Related