Failed to open /qemu.conf, err: 2

25,050

Solution 1

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

Solution 2

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.

Solution 3

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

Share:
25,050
Malindu Sasanga
Author by

Malindu Sasanga

Updated on July 09, 2022

Comments

  • Malindu Sasanga
    Malindu Sasanga almost 2 years

    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.

  • tuo
    tuo over 4 years
    Do you have AMD CPU? If so, please, follow the steps in this article. There's a new Hypervisor for AMD CPUs only. androidstudio.googleblog.com/2019/12/…
  • Maikon Matheus
    Maikon Matheus over 2 years
    Thats works! Thanks!! To avoid the need of to run as an administrator, I added the Full control permission to Everyone in the created file.
  • Amit Panasara
    Amit Panasara about 2 years
    'emulator' is not recognized as an internal or external command, operable program or batch file.
  • Amit Panasara
    Amit Panasara about 2 years
    INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A) PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
  • sitholewb
    sitholewb about 2 years
  • sitholewb
    sitholewb about 2 years
    another video here youtube.com/watch?v=MuerMz235DU