Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to open /qemu.conf, err: 2

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.

like image 888
Malindu Avatar asked Dec 27 '19 20:12

Malindu


3 Answers

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:

ProcessMonitor of Sysinternals

Create the file with this command:

echo # > c:\qemu.conf

cmd.exe output

like image 61
Sergio Cabral Avatar answered Oct 18 '22 07:10

Sergio Cabral


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.

like image 15
sitholewb Avatar answered Oct 18 '22 07:10

sitholewb


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.

enter image description here

like image 4
Aidas K Avatar answered Oct 18 '22 06:10

Aidas K