-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Studio 3.0 with Flutter & Dart plugin not recognizing USB or virtual devices when clicking Play #1525
Comments
From @Hixie on November 14, 2017 23:20 cc @devoncarew |
From @macfeaster on November 18, 2017 17:52 Just curious, have you configured the Flutter plugin in IntelliJ under the Languages & Frameworks section? If this configuration does not have the right Flutter installation path, the Flutter plugin will not be able to launch the app via Android Studio. |
From @pawelkw on November 18, 2017 21:10 Same problem here. Same config as OP. Happens in both AS and IntelliJ IDEA CE. |
The Flutter IDE plugin is expected to show the exact same list of devices as |
@pawelkw, just checking are you also on Windows? And also seeing the expected list of devices in |
@mit-mit No, I'm on a Mac with High Sierra, |
@mit-mit You bet.. ok, updated to version 19.1 but it still doesn't work for me in Android Studio 3.0.1.
|
Thanks for confirming! |
Working for me now. Pulled repo + 19.1 plugin. Created new project in IntelliJ IDEA CE - devices show up correctly now. Project is deployed to selected device correctly. Mac High Sierra. |
I also experience this bug, but only on Windows, macOS works correctly. Same physical Android device on both machines, As a possible clue, the dropdown will always be showing "Loading..." when you click it, I suspect that loading the list of devices is just never returning anything. |
Restored original title because projects generated by |
I had the same problem today. The device selector in the Android Studio toolbar wouldn't even show up, but the device was in the list of connected devices when running I ran the app from the command line with |
What OS do you use ? I run in same problem, i'm using ubuntu 16.04 and android studio 3.0.1 . I can run it from terminal |
I'm on a Windows 10 machine and also using Android Studio 3.0.1. Here's my
|
Windows 10 and AS3.0.1 Flutter plugin 22.2.1 |
Archinux and latest Flutter:
I can run I get the same message when I change the target to my Android phone. |
For anyone that's having this problem, check your pubspec.yaml file. I had some invalid syntax and fixing that resulted in the Android device list appearing and letting me run my app. Maybe as a fix, can the plugin catch such bad syntax? I was able to catch it when I ran flutter through the terminal in my project folder. |
@cisko3000, that may not be the most common reason why users would see this error (typically, windows specific issues, PATH issues, or needing to restart Android Studio after some path dependency changes). However, we do check the pubspec.yaml file to determine if the project is a flutter project, so fixing the syntax error is likely why the device list started showing up again (we then recognized it as a flutter project). Do you have an example of the broken version of the file? We can make the flutter pubspec detection more robust, or add additional analysis to show warnings for issues in the pubspec file. Thanks! |
I've also been dealing with this issue. I had added the launcher for Android Studio via The specific issue was when running Setup |
Same problem here, Ubuntu 16.04; |
Same problem here, XUbuntu 16.04. I can run the app via Terminal but in Android Studio nothing, It doesn't recognize any connected device. |
just run as administrator |
I had the same issue. @akash1202 solved the problem. |
just add path of ANDROID_HOME(android sdk location) |
Same problem,
|
The same problem on Linux Mint when starting Android Studio from GUI "Menu". |
@akash1202 it work! |
I am having same issue. Mac High Sierra 10.13.5. |
I had the same issue while running on a Windows machine. I did the following:
|
i had the same issue while using flutter first time , i will tell how i solved it for window platform.
|
Just tried to install Android Studio and flutter on my Windows 10 Pro and Home laptops, created a basic flutter app. When I click 'Run", I've got "No Connected Devices Found" pop up, "Flutter Device Selection" shows "< no devices >", click on the dropdown arrow, it shows "Loading..." (not sure it is actually loading device list or gets stuck), my connected device does not show up. my "fullter doctor -v"
I can use "flutter run"
Besides flutter command, Android Studio's "Connection Assistant" also detected my device, Android Studio's logcat window even shows messages from my device. However, I can't use Android Studio's "Run" command because it (i.e., flutter's plugin?) does not see my device and thus I can't choose my device in "Flutter Device Selection" droplist. I treid some suggestions from replies of this issue (such as Run "Android Studio" as administrator), none of them fix the problem. This happens on both of my Windows 10 laptops (Pro and Home). Flutter team, please give us a solution for this issue, it's so frustrating. |
I also encountered this problem, I tried running as administrator, and setting ANDROID_HOME as suggested above and neither helped, eventually I resolved it by setting the flutter SDK path in |
Update: today I upgraded to Flutter version 1.2.1 and Android Studio (3.3) finally sees my device. EDIT: too bad, the problem is back. "flutter doctor -v" shows a connected device, while Android Studio does NOT. |
Once Restart your system or run this comment flutter run |
I have this same issue intermittently on: Flutter plugin 46.0.2 I know Flutter paths etc are correct because the Flutter Target Selector does sometimes show all connected devices and matches what is seen by flutter devices. The only way I can get it to work is to restart Android Studio until it decides to pick up the devices correctly. |
This comment is for the Linux users facing this problem. You are probably setting ANDROID_HOME, ANDROID_SDK_ROOT and DART_SDK etc. in Set the variables in It seems like Android Studio does not start a shell in order to run. I'm guessing that JetBrains just run Thanks to @intra s comment about the devices showing up in the command line but not from the GUI. This pointed me towards that the PATH is only set in the shell, but not in the system environment. |
I had the issue on Windows 10, my IntelliJ IDEA does not showed any Android emulators in the Devices combo box. |
From @tomnta on November 14, 2017 19:22
Steps to Reproduce
Run "Flutter Devices" in Windows 10 Command Prompt shows that a device is connected.
However, pressing Run in Android Studio 3.x returns this error popup:
https://flutter.io/setup/ guides the user to this link https://flutter.io/setup-windows/#android-setup
And that page has no directions on how to setup the IDE to recognize that you have a device attached or to have it work with the virtual device.
The same error window pops up when you select a virtual device and press Play in Android Studio. However, pressing Play on an Android project works fine with virtual and USB devices.
Logs
N/A. The command line tool works fine. The Android Studio plugin has issues.
Flutter Doctor
[√] Flutter (on Microsoft Windows [Version 10.0.14393], locale en-US, channel alpha)
• Flutter at C:\Users\Tom\flutter
• Framework revision e8aa40eddd (4 weeks ago), 2017-10-17 15:42:40 -0700
• Engine revision 7c4142808c
• Tools Dart version 1.25.0-dev.11.0
[√] Android toolchain - develop for Android devices (Android SDK 27.0.0)
• Android SDK at C:\Users\Tom\AppData\Local\Android\sdk
• Platform android-27, build-tools 27.0.0
• Java binary at: F:\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[√] Android Studio (version 3.0)
• Android Studio at F:\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[√] Connected devices
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)
Flutter plugin version 19
Copied from original issue: flutter/flutter#13020
The text was updated successfully, but these errors were encountered: