Flutter-intellij: Android Studio device list shows "loading" and no devices connected

Created on 9 Aug 2019  ·  46Comments  ·  Source: flutter/flutter-intellij

0

I've installed Android Studio with Flutter/Dart plugin on Win10. Android Studio 3.4.2 Flutter Plugin 38.2 Dart Plugin v183.6270

If i open a Flutter project in android studio, the device list always displays "loading", in the device list i see my three devices:
image

I selected one device and it opens on the emulator, but when i start the project this error message is displayed:
image

When i run "flutter devices", the device is listed as connected:
image

What is going wrong?

bug

Most helpful comment

  1. Search everywhere (Shift + Shift):
    image

  2. Search for restart flutter daemon:
    image

Device should appear after this.

All 46 comments

Do you still see this problem after updating everything to latest (AS, plugin, SDK)?

having the same problem with latest AS & Plugins

Without additional information we're unfortunately not sure how to resolve this issue. We're going to close this bug for now, but please don't hesitate to comment on the bug if you have any more information for us; we're happy to reopen. Thanks for your contribution!

We'll investigate and see if we can repro/

I'm also having the same issue.

Output from flutter doctor -v:

$ flutter doctor -v
[√] Flutter (Channel beta, v1.9.1+hotfix.3, on Microsoft Windows [Version 10.0.18990.1], locale en-GB)
• Flutter version 1.9.1+hotfix.3 at C:\src\flutter
• Framework revision a72edc2706 (23 hours ago), 2019-09-25 15:41:01 -0700
• Engine revision b863200c37
• Dart version 2.5.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\camer\Android
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = C:\Users\camer\Android
• Java binary at: C:\Users\camer\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\191.5791312\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Android Studio (version 3.5)
• Android Studio at C:\Users\camer\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\191.5791312
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.38.1)
• VS Code at C:\Users\camer\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.4.1

[!] Connected device
! No devices available

! Doctor found issues in 1 category.

In this case I had no devices attached, but Android Studio shows "Loading..." in the devices dropdown for the flutter plugin. I get the same behaviour with a Pixel 2 XL attached. Running flutter run works as expected.

EDIT: I tested installing IntelliJ IDEA and also had the same problem.

image

New flutter doctor -v output:

[√] Flutter (Channel beta, v1.9.1+hotfix.3, on Microsoft Windows [Version 10.0.18990.1], locale en-GB)
    • Flutter version 1.9.1+hotfix.3 at C:\src\flutter
    • Framework revision a72edc2706 (2 days ago), 2019-09-25 15:41:01 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\camer\Android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\Users\camer\Android
    • Java binary at: C:\Users\camer\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\191.5791312\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Users\camer\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\191.5791312
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] IntelliJ IDEA Ultimate Edition (version 2019.2)
    • IntelliJ at C:\Users\camer\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\192.6817.14
    • Flutter plugin version 39.0.5
    • Dart plugin version 192.6817.14

[√] VS Code (version 1.38.1)
    • VS Code at C:\Users\camer\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.4.1

[√] Connected device (1 available)
    • Pixel 2 XL • 711KPMZ0833835 • android-arm64 • Android 10 (API 29)

• No issues found!

and flutter devices:

1 connected device:

Pixel 2 XL • 711KPMZ0833835 • android-arm64 • Android 10 (API 29)

I have not been able to duplicate this problem on either Mac or Windows. However, I think #4014 will fix it. Hopefully, we will get that PR into the M41 release.

Speculatively closing as fixed by https://github.com/flutter/flutter-intellij/pull/4014.

Issue still exists:

image

[✓] Flutter (Channel master, 1.20.0-1.0.pre.55, on Mac OS X 10.15.5 19F101, locale en-IL)
    • Flutter version 1.20.0-1.0.pre.55 at /usr/local/lib/flutter
    • Framework revision 3dad0a2930 (70 minutes ago), 2020-06-15 12:00:36 -0700
    • Engine revision 965fbbed17
    • Dart version 2.9.0 (build 2.9.0-14.0.dev 2b917f5b6a)


[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/sasa/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • ANDROID_HOME = /Users/sasa/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/sasa/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2020.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 46.0.3
    • Dart plugin version 201.7846.93

[✓] VS Code (version 1.46.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.11.0

[✓] Connected device (1 available)
    • iPhone SE (2nd generation) • B083870D-9BBC-4CA7-B8A4-55A4F5145258 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)

• No issues found!

I've noticed this lately, too. It seems to be intermittent.

I can repro the issue by creating a new project. Closing and re-opening it (without shutting down Android Studio) causes the device list to be updated, most of the time. Quitting and restarting Android Studio with the project open frequently causes the list to never populate.

cc @devoncarew

I wonder if there's a new race condition? Or an exception being thrown by the device daemon? I've seen this as well, and have been able to work around the issue by restarting the flutter daemon process (via the IntelliJ action). cc @helin24

Seeing this here too FWIW. Happy to test any fixes.

and have been able to work around the issue by restarting the flutter daemon process

@devoncarew same, fixed by restarting daemon.

I can take a look, thanks for the notes.

Hy, i'm having the same issue here. Mac pro, device list stuck on Loading... while iOS emulator is already open.

Hy, i'm having the same issue here. Mac pro, device list stuck on Loading... while iOS emulator is already open.

I just merged a fix for this problem, but in the meantime you can try closing and reopening the project (without restarting Android Studio / IntelliJ in between).

I had the same problem.
Option 1:

  • Close the emulator
  • Close the project
  • Re-open the project
    -> Devices should be available

Option 2

  • Close emulator
  • Close project
  • Invalidate Caches & Restart
  • Open project
    -> Devices are loaded and available

I also have this problem, and later I solved it by switching Flutter channels, I hope to help you.

Facing same problem, no emulator open but list showing "Loading....", worse still unable to run app through InteliJ Idea IDE saying 'Device not connected' - although device is shown and flutter doctor can find it as well.

This was working fine few hours ago until flutter update.

Facing same problem, no emulator open but list showing "Loading....", worse still unable to run app through InteliJ Idea IDE saying 'Device not connected' - although device is shown and flutter doctor can find it as well.

This was working fine few hours ago until flutter update.

@manishh the second part of this (device not connected) sounds like it may be a separate problem. I recommend trying the steps above (close and re-open project) to fix "Loading...", then potentially opening a new issue for the second problem, with your flutter doctor output and any other relevant system info.

Hello
Since I had upgrade Flutter I have alway in my selection device Loading...
I am Flutter beginner Could you help me please to solved this problem Thank you a lot

Hello
My problem has been solved, this should be the official problem, I replaced the Flutter SDK, which has solved my problem, I hope to help you

------------------ 原始邮件 ------------------
发件人: "Carle2"<[email protected]>;
发送时间: 2020年6月20日(星期六) 上午7:04
收件人: "flutter/flutter-intellij"<[email protected]>;
抄送: "朱林文"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [flutter/flutter-intellij] Android Studio device list shows "loading" and no devices connected (#3892)

Hello
Since I had upgrade Flutter I have alway in my selection device Loading...
I am Flutter beginner Could you help me please to solved this problem Thank you a lot


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi Flutter team,

I'm encountering the same problems using the latest version of flutter. I tried to replaced the flutter folder with the previous version and the devices were loaded. I think the latest version might cause the problem.

Hello,
We have alway some problem with Flutter when update
I have
1 remove Flutter
2 reinstalled Flutter new and old version

I do Flutter doctor -v is ok

But i have alway Loading...
Please do you have a solution ????
For me problem not solved...
Thank you.

  1. Search everywhere (Shift + Shift):
    image

  2. Search for restart flutter daemon:
    image

Device should appear after this.

Hello thank you for your solution but I use Android studio and I have still the same error
when I ran command flutter devices I have emulator-5554 device
and my device is open bbut impossible to run and i have Loading....
do you have a solution a fix etc.... please I am disapoint with Flutter

@Carle2 Check navigate menu, I think you have this option in Android Studio as well.

1. Search everywhere (Shift + Shift):
   ![image](https://user-images.githubusercontent.com/1386622/85207848-71f87100-b334-11ea-9782-4413b8da1b7f.png)

2. Search for `restart flutter daemon`:
   ![image](https://user-images.githubusercontent.com/1386622/85207858-8177ba00-b334-11ea-986a-0a9c8b0a2eeb.png)

Device should appear after this.

I m using IntelliJ IDEA, so tried this. But no luck - it still shows "Loading...."

  1. Search everywhere (Shift + Shift):
    image
  2. Search for restart flutter daemon:
    image

Device should appear after this.

Didn't work with Android studio as well. Still shows "Loading....".

This is a really poor experience for people trying to get their hands on flutter. If one cannot even run the basic starter application, this speaks volumes about the stability of the platform.

For any one facing this issue, use VS Code, the emulator is detected correctly and works perfectly fine.

Downgrading flutter to v1.12.13+hotfix.9 with AS v4.0 works.

I m having the same problem - For me it is getting solved by closing the project from "File -> close project" and reopening the project.

I hope this helps some one.

Downgrading flutter to v1.12.13+hotfix.6 with AS v4.0 works on MacOS

Hello
Finaly I solved my problem when I install version 1.17.3 see in this link
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
*I dont trust to Flutter team now... I lost a big times *

I save this version until he solved this problem.

It's seem to me that VSCode can run without any issues related to devices. The bug is belong to JetBrains's IDE. Both Android Studio and Intellij have this problem. It took me the whole afternoon to find solution.

Hello
Finaly I solved my problem when I install version 1.17.3 see in this link
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
*I dont trust to Flutter team now... I lost a big times *

I save this version until he solved this problem.

Also works for me. I was trying too fix this issue for 5 days now. Problem after updating android studio. Problem really need to be solved!!

Hello
Finaly I solved my problem when I install version 1.17.3 see in this link
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
*I dont trust to Flutter team now... I lost a big times *

I save this version until he solved this problem.

This solved for me.

Hello
Finaly I solved my problem when I install version 1.17.3 see in this link
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
*I dont trust to Flutter team now... I lost a big times *
I save this version until he solved this problem.

This solved for me.

Thank you. This solved the problem. I had been struggling with this for the past three days.

Hello
Finaly I solved my problem when I install version 1.17.3 see in this link
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
*I dont trust to Flutter team now... I lost a big times *

I save this version until he solved this problem.

Thank you, fixed it for me as well

Thank you, fixed it for me as well

it is fixed in 1.17.3 but got the error again in 1.17.4

Still experience this error. Very annoying.

`[✓] Flutter (Channel dev, 1.19.0-5.0.pre, on Mac OS X 10.15.5 19F101, locale ru-RU)
• Flutter version 1.19.0-5.0.pre at /Users/saturov/Library/flutter
• Framework revision c264b70ec3 (2 weeks ago), 2020-06-08 09:27:34 -0700
• Engine revision c7f9725521
• Dart version 2.9.0 (build 2.9.0-13.0.dev 87c5e3612b)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/saturov/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.1

[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
`

Alternatively, according to official documentation you can:

Terminal/Console:

  1. flutter channel- check if you are in Stable version
  2. If not, please run flutter channel stable
  3. Then -> flutter upgrade

Open Android Studio -> Go to Terminal tab :

  1. flutter emulators
  2. flutter emulators --launch {yourEmulator} - replace {yourEmulator} by your emulator config

flutter downgrade to 1.17.3 was the solution for me.

26 June 2020, I solved with 1.17.3 and these important steps. _Now, it is working very well!_
Click to See My StackOverflow Answer

Simply just downgrading to flutter 1.17.3 worked for me too!

Configuration:

Android Studio 4.0 Build #AI-193.6911.18.40.6514223, built on May 20, 2020,
macOS Catalina 10.15.5

After multiple attempts the only one that solved was downgrading to 1.17 despite it seems to be an issue with Android Studio as for VSCode still working with the last version.

MacOS High Sierra 10.13.6
Android Studio 4.0

This is fixed in the latest flutter-intellij plugin version, 47.0.3

If upgrading to the latest plugin version does not fix your issue, please open a separate issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaveShuckerow picture DaveShuckerow  ·  3Comments

devoncarew picture devoncarew  ·  3Comments

KevinTheGray picture KevinTheGray  ·  3Comments

galeyang picture galeyang  ·  4Comments

brianegan picture brianegan  ·  3Comments