简体   繁体   English

使用 Hyper-V 进行 Android 开发

[英]Android development with Hyper-V on

So I see some issues on Stack Overflow, saying that I need to turn off Hyper-V to get the Android emulator to run.所以我在 Stack Overflow 上看到了一些问题,说我需要关闭 Hyper-V 才能运行 Android 模拟器。 However, I also have Docker for Windows installed, which requires Hyper-V to function.但是,我还安装了 Docker for Windows,它需要 Hyper-V 才能运行。 What is the best way to resolve this?解决此问题的最佳方法是什么?

Is it possible to get the Android emulator to work on Intel HAXM while leaving Hyper-V alone for Docker?是否有可能让 Android 模拟器在英特尔 HAXM 上工作,同时将 Hyper-V 单独留给 Docker?

I don't know about the Android emulator part of this question, but in case this is not solvable you could instead use Docker Toolbox which runs without Hyper-V (but Virtualbox instead).我不知道这个问题的 Android 模拟器部分,但如果这不能解决,你可以改用Docker Toolbox ,它在没有 Hyper-V 的情况下运行(而是使用 Virtualbox)。

This is a legacy solution, but actually recommended by Docker documentation in case your system does not fulfill the requirements, eg for Windows 10 Home users ( Quote : "Note: If your system does not meet the requirements to run Docker for Windows, you can install Docker Toolbox, which uses Oracle Virtual Box instead of Hyper-V.").这是一个遗留解决方案,但实际上 Docker 文档推荐,以防您的系统不满足要求,例如 Windows 10 家庭用户( 引用:“注意:如果您的系统不满足运行 Docker for Windows 的要求,您可以安装 Docker Toolbox,它使用 Oracle Virtual Box 而不是 Hyper-V。”)。

You can use Hyper-V for accelerating the Android emulator instead of HAXM.您可以使用 Hyper-V 而不是 HAXM 来加速 Android 模拟器。 That way you can use docker as well.这样你也可以使用docker。 I do the same.我也一样。 Probably you are just missing "Windows Hypervisor Platform" from the Windows Features.可能您只是缺少 Windows 功能中的“Windows 管理程序平台”。 Make sure it is enabled too.确保它也已启用。

For further information see: Hardware acceleration for emulator performance (Hyper-V & HAXM)有关更多信息,请参阅: 针对模拟器性能的硬件加速(Hyper-V 和 HAXM)

There's been some changes to Hyper-V in Windows that allows Android emulation to work with Hyper-V, as mentioned here: Windows 中的 Hyper-V 进行了一些更改,允许 Android 模拟与 Hyper-V 一起使用,如下所述:

https://devblogs.microsoft.com/visualstudio/hyper-v-android-emulator-support/ https://devblogs.microsoft.com/visualstudio/hyper-v-android-emulator-support/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM