Android Studio模拟器“找不到/ dev / kvm”

时间:2022-06-12 18:55:36

Couldn't use x86 emulators, AVD manager shows warning "/dev/kvm is not found" and telling me to edit BIOS security setting to enable VT-x.Android Studio模拟器“找不到/ dev / kvm”

无法使用x86仿真器,AVD管理器显示警告“找不到/ dev / kvm”并告诉我编辑BIOS安全设置以启用VT-x。

8 个解决方案

#1


43  

Re-installing HAXM resolved my problem Steps:

重新安装HAXM解决了我的问题步骤:

  1. Make sure SDK Manager -> Extras -> Intel x86 Emulator Accelerator (HAXM installer) is installed
  2. 确保已安装SDK Manager - > Extras - > Intel x86 Emulator Accelerator(HAXM安装程序)

  3. Navigate to <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/
  4. 导航到 / extras / intel / Hardware_Accelerated_Execution_Manager /

  5. Run ./HAXM\ installation -u
  6. 运行./HAXM \ installation -u

  7. Run ./HAXM\ installation
  8. 运行./HAXM \ installation

#2


41  

For MacOS users running Android Studio, when you get this error then try these steps to open up your privacy settings.

对于运行Android Studio的MacOS用户,当您收到此错误时,请尝试以下步骤打开您的隐私设置。

Android Studio模拟器“找不到/ dev / kvm” Android Studio模拟器“找不到/ dev / kvm” Android Studio模拟器“找不到/ dev / kvm”

You can also follow the answer from Divakar on this post here - /dev/kvm not found on mac

你也可以在这篇文章中关注Divakar的回答 - / dev / kvm在mac上找不到

Thank you Apple for pushing me with your dumb*** app review rules from iOS to android development

感谢Apple推动我从iOS到Android开发的愚蠢的***应用评论规则

#3


1  

I had a similar message in the emulators area in Android Studio 2.1.

我在Android Studio 2.1的模拟器区域中有类似的消息。

My emulator for a certain API (think 21) worked initially fine and was fully accelerated, then installed a couple of other images (Nougat x86/64 etc) and suddenly started seeing /dev/kvm not found and NO emulator would boot up.

我的某个API(想想21)的模拟器最初工作正常并且完全加速,然后安装了几个其他图像(Nougat x86 / 64等)并突然开始看到找不到/ dev / kvm并且没有模拟器启动。

  • In My Case, re-installing HAXM sadly did not help, but rebooting my MAC did (go figure).

    在我的案例中,重新安装HAXM遗憾地没有帮助,但重启我的MAC确实(如图)。

  • But, I also noted that if you have installed an emulator image but not the related SDK for the API (which makes sense), then you get a similar pop-up when starting the emulator, which makes you think it may be a HAXM / KVM issue, which its not.

    但是,我还注意到,如果您已经安装了模拟器映像但没有安装API的相关SDK(这是有意义的),那么在启动模拟器时会出现类似的弹出窗口,这使您认为它可能是HAXM / KVM问题,其中没有。

Hope this helps someone.

希望这有助于某人。

#4


1  

You just need to "start" the HAXM. You can do this following this steps:

你只需要“启动”HAXM。您可以按照以下步骤执行此操作:

  1. Open the cmd.
  2. 打开cmd。

  3. Type sc query intelhaxm, click enter and check the STATE.
  4. 键入sc query intelhaxm,单击enter并检查STATE。

  5. If state is 1 STOPED, type sc start intelhaxm and click enter to start the HAXM.
  6. 如果state为1 STOPED,请键入sc start intelhaxm并单击enter以启动HAXM。

  7. Check the STATE again and it should be 4 RUNNING now.
  8. 再次检查状态,现在应该是4 RUNNING。

  9. Finally, you are now able to create and use your AVD using a x86 emulator.
  10. 最后,您现在可以使用x86仿真器创建和使用AVD。

Alternatively, when you want to stop the HAXM you should type sc stop intelhaxm.

或者,当您想要停止HAXM时,您应该键入sc stop intelhaxm。

Hope this helps y'all.

希望这对你们有所帮助。

#5


0  

On Mac OS, After installing make sure to allow Intel HAXM under "Security & Privacy".

在Mac OS上,安装后请确保在“安全和隐私”下允许Intel HAXM。

This was the only way I was able to run the Android Emulator :)

这是我能够运行Android模拟器的唯一方法:)

#6


0  

Reinstalling and restarting did not work for me. Instead, I had to start my Mac in Recovery Mode (restart & press ⌘+R until Apple logo appears). Then open terminal from Utilities drop down menu. Type and run:

重新安装和重新启动对我不起作用。相反,我必须在恢复模式下启动我的Mac(重新启动并按⌘+ R直到出现Apple徽标)。然后从Utilities下拉菜单中打开终端。输入并运行:

csrutil enable --without kext

You will get some warnings and instruction to restart for the changes to take effect. Restart and the emulator will run this time.

您将收到一些警告和重新启动指令,以使更改生效。重启,模拟器将在这次运行。

Reference: https://blog.celogeek.com/201708/672/android-studio-emulator-haxm-on-mac-os-high-serria-10-13/

#7


0  

Just go to terminal and type

只需前往终端并输入

sudo chown 777 -R /dev/kvm,

then type

sudo chmod 777 -R /dev/kvm.

And restart android studio

并重新启动android studio

And that's it..

就是这样......

In some case it may happened that for every start of android studio you need to type this commands First and then start android studio.

在某些情况下,可能会发生这样的问题,对于Android studio的每次启动,您都需要先键入此命令然后启动android studio。

#8


-2  

I tried reinstalling HAXM a few times but kept getting the errors.

我尝试重新安装HAXM几次,但不断收到错误。

In my case I actually had to go into Bios Settings and enable Virtualization.

在我的情况下,我实际上必须进入Bios设置并启用虚拟化。

It worked for me. Just in case this helps anyone.

它对我有用。以防这有助于任何人。

#1


43  

Re-installing HAXM resolved my problem Steps:

重新安装HAXM解决了我的问题步骤:

  1. Make sure SDK Manager -> Extras -> Intel x86 Emulator Accelerator (HAXM installer) is installed
  2. 确保已安装SDK Manager - > Extras - > Intel x86 Emulator Accelerator(HAXM安装程序)

  3. Navigate to <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/
  4. 导航到 / extras / intel / Hardware_Accelerated_Execution_Manager /

  5. Run ./HAXM\ installation -u
  6. 运行./HAXM \ installation -u

  7. Run ./HAXM\ installation
  8. 运行./HAXM \ installation

#2


41  

For MacOS users running Android Studio, when you get this error then try these steps to open up your privacy settings.

对于运行Android Studio的MacOS用户,当您收到此错误时,请尝试以下步骤打开您的隐私设置。

Android Studio模拟器“找不到/ dev / kvm” Android Studio模拟器“找不到/ dev / kvm” Android Studio模拟器“找不到/ dev / kvm”

You can also follow the answer from Divakar on this post here - /dev/kvm not found on mac

你也可以在这篇文章中关注Divakar的回答 - / dev / kvm在mac上找不到

Thank you Apple for pushing me with your dumb*** app review rules from iOS to android development

感谢Apple推动我从iOS到Android开发的愚蠢的***应用评论规则

#3


1  

I had a similar message in the emulators area in Android Studio 2.1.

我在Android Studio 2.1的模拟器区域中有类似的消息。

My emulator for a certain API (think 21) worked initially fine and was fully accelerated, then installed a couple of other images (Nougat x86/64 etc) and suddenly started seeing /dev/kvm not found and NO emulator would boot up.

我的某个API(想想21)的模拟器最初工作正常并且完全加速,然后安装了几个其他图像(Nougat x86 / 64等)并突然开始看到找不到/ dev / kvm并且没有模拟器启动。

  • In My Case, re-installing HAXM sadly did not help, but rebooting my MAC did (go figure).

    在我的案例中,重新安装HAXM遗憾地没有帮助,但重启我的MAC确实(如图)。

  • But, I also noted that if you have installed an emulator image but not the related SDK for the API (which makes sense), then you get a similar pop-up when starting the emulator, which makes you think it may be a HAXM / KVM issue, which its not.

    但是,我还注意到,如果您已经安装了模拟器映像但没有安装API的相关SDK(这是有意义的),那么在启动模拟器时会出现类似的弹出窗口,这使您认为它可能是HAXM / KVM问题,其中没有。

Hope this helps someone.

希望这有助于某人。

#4


1  

You just need to "start" the HAXM. You can do this following this steps:

你只需要“启动”HAXM。您可以按照以下步骤执行此操作:

  1. Open the cmd.
  2. 打开cmd。

  3. Type sc query intelhaxm, click enter and check the STATE.
  4. 键入sc query intelhaxm,单击enter并检查STATE。

  5. If state is 1 STOPED, type sc start intelhaxm and click enter to start the HAXM.
  6. 如果state为1 STOPED,请键入sc start intelhaxm并单击enter以启动HAXM。

  7. Check the STATE again and it should be 4 RUNNING now.
  8. 再次检查状态,现在应该是4 RUNNING。

  9. Finally, you are now able to create and use your AVD using a x86 emulator.
  10. 最后,您现在可以使用x86仿真器创建和使用AVD。

Alternatively, when you want to stop the HAXM you should type sc stop intelhaxm.

或者,当您想要停止HAXM时,您应该键入sc stop intelhaxm。

Hope this helps y'all.

希望这对你们有所帮助。

#5


0  

On Mac OS, After installing make sure to allow Intel HAXM under "Security & Privacy".

在Mac OS上,安装后请确保在“安全和隐私”下允许Intel HAXM。

This was the only way I was able to run the Android Emulator :)

这是我能够运行Android模拟器的唯一方法:)

#6


0  

Reinstalling and restarting did not work for me. Instead, I had to start my Mac in Recovery Mode (restart & press ⌘+R until Apple logo appears). Then open terminal from Utilities drop down menu. Type and run:

重新安装和重新启动对我不起作用。相反,我必须在恢复模式下启动我的Mac(重新启动并按⌘+ R直到出现Apple徽标)。然后从Utilities下拉菜单中打开终端。输入并运行:

csrutil enable --without kext

You will get some warnings and instruction to restart for the changes to take effect. Restart and the emulator will run this time.

您将收到一些警告和重新启动指令,以使更改生效。重启,模拟器将在这次运行。

Reference: https://blog.celogeek.com/201708/672/android-studio-emulator-haxm-on-mac-os-high-serria-10-13/

#7


0  

Just go to terminal and type

只需前往终端并输入

sudo chown 777 -R /dev/kvm,

then type

sudo chmod 777 -R /dev/kvm.

And restart android studio

并重新启动android studio

And that's it..

就是这样......

In some case it may happened that for every start of android studio you need to type this commands First and then start android studio.

在某些情况下,可能会发生这样的问题,对于Android studio的每次启动,您都需要先键入此命令然后启动android studio。

#8


-2  

I tried reinstalling HAXM a few times but kept getting the errors.

我尝试重新安装HAXM几次,但不断收到错误。

In my case I actually had to go into Bios Settings and enable Virtualization.

在我的情况下,我实际上必须进入Bios设置并启用虚拟化。

It worked for me. Just in case this helps anyone.

它对我有用。以防这有助于任何人。