I got this error while using windows command prompt to connect a android virtual device to visual studio code. However opens the android virtual device but still says no connected devices when run the flutter doctor command. please help to use a android virtual device for visual studio code.
This error occur because there is a query for file in C:\qemu.conf
path.
If you create a blank file the warning Failed to open /qemu.conf, err: 2
will desapear.
But in my tests, I needed to run as an administrator. (about this, look to the first comments above. Thanks for trick, Maikon Matheus)
This is the log in ProcessMonitor of Sysinternals:
Create the file with this command:
echo # > c:\qemu.conf
This issue is resolved by Cold Boot, the command emulator -avd <avd_name> -no-snapshot-load
, execute this on command prompt or terminal on Linux.
Make sure that emulator is added to system PATH.
You have to fulfil android emulator requirements based on your system.
Android emulator requirements: https://developer.android.com/studio/run/emulator#requirements
My problem was missing this requirement:
reHAXM 6.2.1 or later (HAXM 7.2.0 or later recommended)
Solution was to go in Tools -> SDK Manager, and check Intel (HAXM installer) option.
I had the same error when ran
D:\Android>emulator -avd AndroidDevice01
The Problem was solved when I started cmd.exe with Administrative privileging!
I got the same error and problem after updating flutter and android studio. After updating my emulator didn't work correctly , it was asking me to use androidx when I ran "flutter run" command in vs code terminal . later I found this link to migrate my app to android x https://flutter.dev/docs/development/androidx-migration , this will provide you all the steps to do it.After doing that android studio will ask to update some more plugins please do it. Still you'll be getting the same error when opening your emulator using the cmd but the emulator will work fine and when you run flutter doctor it will show device connected.please make sure to run flutter doctor after running the emulator else it will show as not connected. Hope you understood what I said
I also have exactly the same issue after updating Android SDK and Emulator to the latest version. And it doesn't look like it is related to Flutter (but I actually have it installed too). I posted this bug on issuetracker.google.com and provided all the logs. Hope they'll manage to help... P.S. I'll notify if they'll provide any solution.
© 2022 - 2024 — McMap. All rights reserved.