0

As you can see that there are two devices being shown in the IDEA. But when I run it. It displays the below error that "Unable to locate a development device; please run 'flutter doctor' for information about installing additional components." enter image description here

Also here is the Response of the Flutter doctor. There is a very strange behavior, when I run flutter doctor, It shows me 2 devices connected when actually are, but when I run the same command again it shows me no devices connected. Basically it shows me these responses in alternate manner. Here is the screenshot for the same. enter image description here

Here is one more strange behavior of Flutter. Screenshot for the same provided here below enter image description here Is it not stable with Ubuntu or something? Any help is welcome.

Gaurav A Dubey
  • 641
  • 1
  • 6
  • 19

3 Answers3

2

I got the same "Unable to locate a development device; please run 'flutter doctor' for information about installing additional components." error in Android Studio 3.1.4.

It turned out that I had an old version of adb dated from 2014(!) inside /usr/bin/ and a new version in ~/android-sdk-linux/platform-tools/ (your path may vary).

As root I made:

  • cd /usr/bin
  • mv adb adb_old
  • ln -s ~/android-sdk-linux/platform-tools/adb adb (look out for your correct path!)

That solved it for me.

HTH, regards.

edit: My problem originated from a really old misconfiguration. If your ANDROID_HOME and/or(?) ANDROID_SDK env-variables are pointing to the correct paths, it should be ok. - For my case I just issued a which adb and then headed directly to my solution steps. Resumee: the path and version of adb do matter!

resLin
  • 41
  • 5
0

You try to connect only to one device and run flutter run in terminal.

Hai Tran
  • 9
  • 1
0

Try a few things

  • Make sure that developer mode is activated on your device (including usb debugging).
  • Suitable driver is installed on the system for the device.
  • Use the latest version of SDK.
  • Run flutter clean before installation.
  • Use this command in case of multiple devices connected flutter run -d Mi A1
  • You can also check that cable is properly connected and supports data transfer

If issue still persist then report an issue on github.

Hope it helps..!

ap14
  • 4,393
  • 1
  • 15
  • 30