[英]Android emulator with Hyper V
According to this Microsoft blog post it should be possible now to run an Android emulator with activated Hyper-V on Windows (so we should be able to run Docker beside an Android emulator). 根据此Microsoft博客文章,现在应该可以在Windows上运行已激活的Hyper-V的Android模拟器(因此,我们应该能够在Android模拟器旁边运行Docker)。 I already installed the Windows 10 April 2018 update, downloaded the latest Android emulator (v 27.2.9) and add the WindowsHypervisorPlatform flag.
我已经安装了Windows 10 April 2018更新,下载了最新的Android模拟器(v 27.2.9)并添加了WindowsHypervisorPlatform标志。
I can start the emulatour within the powershell console, I get no warning about activated Hyper-V and I can see as output "Windows Hypervisor Platform accelerator is operational". 我可以在Powershell控制台中启动emulatour,没有收到有关已激活的Hyper-V的警告,并且可以看到输出“ Windows Hypervisor平台加速器正在运行”。 So I guess the flag is working correctly.
所以我猜该标志正常工作。
But for some reason, Android is not booting. 但是由于某种原因,Android无法启动。 The emulator screen stays black.
仿真器屏幕保持黑色。
I tried different Android System Images, but with no luck. 我尝试了不同的Android系统映像,但是没有运气。
Any suggestions? 有什么建议么?
要解决此问题,我建议您将Android Studio更新到最新版本(稳定),即3.1.2,并更新SDK。
The only way I'm able to get it to work is if I start Android Device Manager through Visual Studio . 使它正常工作的唯一方法是通过Visual Studio启动Android设备管理器。
From menu Tools -> Android -> Android Device Manager
从菜单
Tools -> Android -> Android Device Manager
I had to fiddle around a little with android SDK and reinstall tools and images through the SDK manager in Visual Studio as well, but it works surprisingly well! 我不得不在android SDK上花了些力气,并且还通过Visual Studio中的SDK Manager重新安装了工具和图像,但是它的效果令人惊讶!
Tested on Visual Studio 15.8.1 (Aug 17 release) 在Visual Studio 15.8.1 (8月17日发行版)上测试
To resolve this issue: 解决此问题的方法:
Tools -> Android -> Android Device Manager
工具-> Android-> Android设备管理器
Right click the affected emulator, Factory Rest. 右键单击受影响的仿真器Factory Rest。
try this : 尝试这个 :
open cmd(Command Prompt)
in this path C:/users/your_session_name/AppData/Local/Android/Sdk/tools and type: emulator -list-avds
, this command will print the created avds(let's say emulators) for example : Pixel_2_API_25
在此路径C:/ users / your_session_name / AppData / Local / Android / Sdk / tools中打开
cmd(Command Prompt)
,然后键入: emulator -list-avds
,此命令将打印创建的avds(假设是模拟器),例如: Pixel_2_API_25
then type: emulator @Pixel_2_API_25 -writable-system -no-audio -gpu guest
然后键入:
emulator @Pixel_2_API_25 -writable-system -no-audio -gpu guest
this will force to reboot the android emulator 这将强制重新启动android仿真器
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.