question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run a Flutter app because <no devices> even Device File Explorer can detect it

See original GitHub issue

Description

I plugged my device to my development laptop to run a Flutter app. My laptop is already allowed to connect to my mobile device.

However, the button Run does not allow me to deploy the app to the connected device because it thinks that there is no connected device. It is quite wrong. The tab Device File Explorer can browse files in the device already.

The flutter CLI tool can detect the connected device too

C:\Users\pcdinh>flutter upgrade
Upgrading Flutter from D:\dev\flutter...
From https://github.com/flutter/flutter
   0260642fc..1c3f6a851  master     -> origin/master
Updating 0260642fc..1c3f6a851
 2 files changed, 31 insertions(+), 1 deletion(-)

Upgrading engine...
Updating flutter tool...
Already up-to-date.

Flutter 0.2.12-pre.29 • channel master • https://github.com/flutter/flutter.git
Framework • revision 0260642fc5 (6 hours ago) • 2018-04-12 21:16:39 -0700
Engine • revision 76cb311d9c
Tools • Dart 2.0.0-dev.47.0.flutter-f76dad0adc

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v0.2.12-pre.30, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    X Android license status unknown.
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2017.3)
[√] VS Code, 64-bit edition (version 1.22.1)
[√] Connected devices (1 available)

! Doctor found issues in 1 category.

Steps to Reproduce

  • Launch Android Studio with the latest Flutter plugin
  • Edit code
  • Plugin the device and ensure that the device is connected.
  • Press “Run” icon. The dialog appears: “No connected devices found; please connect a device, or see flutter.io/setup for getting started instructions.”'. However, the tab Device File Explorer can see files in the device.

Screenshot: https://imgur.com/a/qEJrR

Version info

D:\dev\flutter\bin\flutter.bat --no-color doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v0.2.12-pre.30, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    X Android license status unknown.
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2017.3)
[√] VS Code, 64-bit edition (version 1.22.1)
[√] Connected devices (1 available)
Android Studio 3.1.1
Flutter plugin 23.2.2

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:21
  • Comments:56 (2 by maintainers)

github_iconTop GitHub Comments

216reactions
pcdinhcommented, Apr 13, 2018

Exit and start Android Studio again can solve the issue

134reactions
dazza5000commented, Aug 19, 2018

I was able to fix this by doing the following advice found in this stackoverflow question:

https://stackoverflow.com/a/51644461/3268303

daz@iloveyou:/media/development/source/publicRepos/woo_flutter$ echo $ANDROID_HOME
/media/development/android-sdk/adt-bundle-linux-x86_64-20131030/sdk
daz@iloveyou:/media/development/source/publicRepos/woo_flutter$ flutter config --android-sdk /media/development/android-sdk/adt-bundle-linux-x86_64-20131030/sdk
Setting "android-sdk" value to "/media/development/android-sdk/adt-bundle-linux-x86_64-20131030/sdk".

set the --android-sdk in the flutter config and now I can deploy directly to android devices from Android Studio

Read more comments on GitHub >

github_iconTop Results From Across the Web

Message "flutter run: No connected devices" - Stack Overflow
In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. Start your app by running ......
Read more >
Solve The Error: No Connected Devices - Flutter Agency
Sometime users get an error like NO Connected Devices while running the fresh installation in Flutter. Learn to solve them.
Read more >
Flutter - Android Studio - No device selected - YouTube
This is a quick video about how to solve the ' No device selected' problem in Android Studio.- by Vladimir HeinzEnjoy my videos!...
Read more >
Debug your database with the Database Inspector
Run your app on an emulator or connected device running API level 26 or higher. · From the menu bar, select View >...
Read more >
Flutter Doesn'T Detect Devices - ADocLib
Unable to run a Flutter app because <no devices> even Device File Explorer can detect it #2084. Open. pcdinh opened this issue on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found