I'm trying to add a virtual phone to the device list, however, the device list is stuck on loading.
I use the default nexus 5 device on AVD:
I am on Windows 10 and trying to set up Flutter.
I'm trying to add a virtual phone to the device list, however, the device list is stuck on loading.
I use the default nexus 5 device on AVD:
I am on Windows 10 and trying to set up Flutter.
If you have stored your Flutter SDK in Local Disk C, then move it to another (Non-Admin Location) disk and then try using Android studio
Alternatively: Simply run your Android Studio as Administrator and it will work fine (Although running flutter with Admin privileges is not recommended nor required either)! I spent 3 hrs looking for a solution and suddenly realized this option and it worked for me
In my case, it was a faulty adb execution that was running in the background.
The only thing that worked for me was:
Just run adb devices
from command prompt while Android Studio is on.
Android Studio will handle the rest.
After hours of searching, this is what I found.
flutter doctor -v
I found that there were some SDK certificates that weren't agreed.
flutter doctor --android-licenses
Allowed me to see which agreements that weren't agreed. After that it worked. I hope this works for you.
Try reinstalling Flutter and/or resetting the Flutter SDK path under "File > Settings > Languages and Frameworks > Flutter".
Its 100% worked for me
step 1- turned OFF your Wi-Fi
step 2- open C:\Users\abcdcomputer\AppData\Local\Android\Sdk\platform-tools
step 3- open command prompt from in this folder
step 4- type " adb disconnect " command in Command prompt
step 5- restart android studio
$PSVersionTable.PSVersion
After running
flutter doctor -v
I found out that my ANDROID_SDK_ROOT was not set. Setting it to the correct directory and restarting Android Studio solved the issue for me.
I can resolve this by running following commands in command line.
$ adb kill-server
cannot connect to daemon at tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)
yes it will throw an error and it means we are good to go
then you should call following command so the adb
stuff start to work again
adb devices
Anyone using macOS, please don't download/upgrade to 1.17.4 of flutter sdk (using with with android studio/intellij). Keep yourself to 1.17.3 even if you are planning for an upgrade . Seems like intellij plugin has bugs with 1.17.4 and i wasted 2-3hrs debugging things until my eyes fell on this thread: https://github.com/flutter/flutter-intellij/issues/3892
If you are using MacOS, then there are issues with flutter version 1.17.4
.
Downloading an older version helped for me.
I had the same issue. Installed Flutter again and issue was fixed
Upgrading to latest version by clicking flutter upgrade and then going to File-> Invalidate Caches /Restart then press Invalidate and Restart worked for me
if nothing worked then try this : Download a new and stable version of Flutter SDK from here , point path of your flutter sdk from settings > search flutter > point path to new downloaded sdk > invalidate cache and restart. you are done !
The problem for me was that ADB was excluded from the Antivirus, so I've simply added an exception for the ADB and the problem was solved
This may happen if you have cloned an app and the Flutter and Dart paths have not been set. Delete the ".idea" folder and set the paths and if there are any connected devices, they will load automatically.
On Windows, I fixed the issue by putting the Android SDK in the PATH. I guess the Flutter plugin internally uses ADB to know the attached devices, so if you don't have it in your path, nothing can be done.
If that's your case, just type adb
on a terminal. If it doesn't work, it means you have to put your Android SDK in the path, so you (and the Flutter plugin) can use it.
Just adding a screenshot just to clarify it a bit.
For me the issue seems to be that my anti-virus program identified dart.exe as a threat and renamed it to dart.exe.000 - what worked for me was -
Solved For Me With:
Update flutter Plugin
File => Invalidate Caches / Restart => Invalidate and Restart
Update Android Studio
Update SDK
Install SDK in Only default Location android Studio
Tools => Troubleshoot Device Connection & read this and continue to Troubleshoot.
Use (RunAsAdmin(Windows) / root USER(Linux)) FOR RUN
if you use physical Device , use code IN TERMINAL LINUX {
sudo apt update sudo apt install adb
and Check if your Device Connected
adb devices
}
I was using another runtime, so I had to Ctrl+Shift+A -> Choose Runtime -> Default
Check this
Project Structure->Project settings-> project->Project SDK setting
For me the project sdk was not set. After selecting the android sdk for the project, "loading devices" option is gone.
https://github.com/flutter/flutter-intellij/issues/5031#issuecomment-838640744
Kill the flutter processes from running first,
taskkill /F /IM dart.exe in your terminal in android studio
then type
flutter run. in the terminal again and press enter.
Afterwards your device you start showing.
None of the answers on this page works for Apple M1 cpus.
On Apple M1 chips the adb
command does not work because it is not built for the Apple silicon. So that needs to be translated first to be runnable on the Apple chip. This is what Rosetta 2 does. To install it manually you can do this in the terminal (Thanks to this answer):
softwareupdate --install-rosetta
followed by
invalidate cache and restart
On Ubuntu I used
adb kill-server
This fixed the problem.
For me solution is
I have moved project from one Machine/Computer to another Machine, so Dart path was wrong.
So I have updated Dart path as per new location in new machine.
Running Android Studio as Administrator (Windows) / Super User (Linux) fixed the issue for me.
I spent a full day trying to solve this issue. Finally, I located and deleted my SDK folder then downloaded new SDK platforms and tools via SDK TOOLS. Everything is working fine now.