“/dev/kvm not found ”error on windows in android studio

来源:互联网 发布:电视机网络顶盒 编辑:程序博客网 时间:2024/04/30 05:34

I faced this issue and after some investigation, I concluded that the problem lies with the installer for HAXM and the way it is used.

Following is how I got it to work:

  1. uninstall previous instance of HAXM from control panel if any.
  2. download HAXM from here.
  3. extract downloaded zip. "haxm-windows_v6_0_1.zip" in my case.

Step 4, 5, 6 can be skipped they just provide some data points for entire process

  1. try running intelhaxm-android.exe.

    At this step I got error "Failed to configure driver: unknown error. Failed to open driver"this seems to be issue with installer itself.

  2. now I tried running "silent_install.bat".

    this installs HAXM but original error "/dev/kvm not found" persist. I believe this is the file which android studio uses to install HAXM but this does not lead to a healthy installation as original installer have some issue.

  3. uninstall HAXM again.

  4. extract intelhaxm-android.exe using winzip or any other program (my org gives me winzip :| )

  5. go to extracted folder ("intelhaxm-android" in my case) and locate "hax64.msi"

    now we need to extract this file, win zip does not support this so I went with command prompt, other programs such as 7zip may support this.

  6. run command prompt in administartor mode (go to start > type cmd in search box > right click on cmd.exe > select run as administrator)

  7. run following command :

    ##>msiexec /a <path\to\file>\hax64.msi /qb TARGETDIR=<path\to\target>\hax64

    in my case it looks like

    C:\Windows\system32>msiexec /a D:\Intel_HAXM\intelhaxm-android\hax64.msi /qb TARGETDIR=D:\Intel_HAXM\intelhaxm-android\hax64

    this will extract "hax64.msi"

  8. now open command prompt in admin mode (refer step 9) and navigate to <newly extracted folder>\Intel\HAXM

    in my case it is "D:\Intel_HAXM\intelhaxm-android\hax64\Intel\HAXM"

  9. now run following command:

    ##> HaxInst64.exe /i intelhaxm.inf 1

    this should result in a success message at the end, something like this:

    SUCCESS: installed package D:\Intel_HAXM\intelhaxm-android\hax64\Intel\HAXM\intelhaxm.inf.

  10. go back to folder we have extracted in step 7

    in my case : D:\Intel_HAXM\intelhaxm-android

  11. run setup.exe, setup should complete without any error this time.

additionally I had to delete the existing AVD and create a new one as existing one was acting weird.

1 0
原创粉丝点击