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.

6
  • Both are real devices? Commented May 28, 2018 at 7:17
  • One is Emulator, the other one is real device. Commented May 28, 2018 at 8:47
  • I have a same issue. Did you solved this? Commented Jun 7, 2018 at 5:42
  • No I have not been able to solve it yet. Still looking for solution Commented Jun 11, 2018 at 12:22
  • I am having the same issue on Ubuntu. Commented Aug 4, 2018 at 21:03

3 Answers 3

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!

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

Comments

0

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

3 Comments

It still throws the issues and in very strange Manner. Adding a screenshot for the same.
Please check the screenshot I added in my question
On Mi-A1 devices. Are you sure opened developer options -> USB debugging?
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..!

1 Comment

The issue still persists. I guess I will have to report it on github.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.