I am trying to run my Flutter app in Android Studio. But when I try to select a device to launch, I am prompted to launch the Android Emulator, which is already running.
When running the flutter devices command, the following message is displayed:
• Device emulator-5554 is not authorized.
You might need to check your device for an authorization dialog.
I tried to find a solution (similar problem) but it didn’t help.
The output of flutter doctor
:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.7.11, on Microsoft Windows [Version 10.0.22621.1555], locale ru-RU)
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.77.3)
[√] Connected device (3 available)
! Device emulator-5554 is not authorized.
You might need to check your device for an authorization dialog.
[√] HTTP Host Availability
! Doctor found issues in 2 categories.
JAVA_HOME
value:
C:Program FilesAndroidAndroid Studiojbr
USB debugging is enabled (screenshot), but nothing happens when running flutter devices
or flutter doctor
. Trying to revoke permissions and execute commands again does not help either.
2
Answers
Have you tried to create a new emulator? Make sure that the emulator is google play compatible.
You can also try to run the command
adb devices
and see if the emulator shows up.IF the new emulator dosent work try to turn it of and run the command
adb kill-server
and then
adb start-server
And start the emulator agian and see if it works then.
Hope this helps
So, I got a problem with the Pixels 2 and 2 XL API 28 (Pie) and here’s what to do :
It should work! It did for me, I think the problem comes from the USB default configuration. I hope it helped, have a nice programming session!