[英]Android emulator in Xamarin Visual Studio does not show the app
I made a new Xamarin Project in Visual Studio , I chose the Single View App .我在 Visual Studio 中创建了一个新的 Xamarin 项目,我选择了 Single View App。
Then I did not make any changes.然后我没有做任何改变。
I just pressed the Run Button.我刚刚按下了运行按钮。
The emulator started ,模拟器启动,
but the app was not appeared in the menu of the phone of the emulator.但该应用程序并未出现在模拟器手机的菜单中。
Is there anyone who know what cause the problem?有没有人知道导致问题的原因?
On Windows you have a couple of options to accelerate the Emulator.在 Windows 上,您有几个选项可以加速模拟器。 Read more here: https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows
在此处阅读更多信息: https : //docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows
Using HyperV : Make sure to install the Windows Hypervisor Platform :使用 HyperV :确保安装Windows 管理程序平台:
You probably need to restart your computer after.之后您可能需要重新启动计算机。
Intel HAXM : If you are not using HyperV and don't intend and don't run other hypervisors such as VMWare, VirtualBox etc. then you can install Intel HAXM.英特尔 HAXM :如果您不使用 HyperV 并且不打算也不运行其他虚拟机管理程序,例如 VMWare、VirtualBox 等,那么您可以安装英特尔 HAXM。
In the Android SDK manager, in tools, download Intel HAXM.在 Android SDK 管理器的工具中,下载 Intel HAXM。 After that is done, go to the folder where the Android SDK is installed.
完成后,转到安装Android SDK的文件夹。 There should be an extras folder where there will be an installer for Intel HAXM.
应该有一个 extras 文件夹,其中有英特尔 HAXM 的安装程序。
On macOS , Intel HAXM is the way to go.在 macOS 上,英特尔 HAXM 是要走的路。 Read how to install it here: https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=macos
在此处阅读如何安装: https : //docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=macos
Should be as easy as running sh ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
from a command-line.应该像从命令行运行
sh ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
。
Either of these approaches should significantly speed up the Android Emulator.这两种方法中的任何一种都应该显着加快 Android Emulator。
If you have issues deloying to the emulator, sometimes the default configurations have very limited space and installing anything may fail due to the emulator running out of storage.如果您在部署到模拟器时遇到问题,有时默认配置的空间非常有限,并且由于模拟器的存储空间不足,安装任何东西都可能会失败。 Go to the Android AVD and increase the internal storage size.
转到 Android AVD 并增加内部存储大小。
For other failures, check the Deploy Output window in Visual Studio and provide more information of what is going wrong.对于其他故障,请检查 Visual Studio 中的“部署输出”窗口,并提供有关出错原因的更多信息。 Otherwise it is just a guess.
否则,这只是一个猜测。
This might be just a bug.这可能只是一个错误。 Create a new project.
创建一个新项目。 If still blank wait 5 minutes.
如果仍然空白,请等待 5 分钟。 Maybe your computer is slow so it takes time to load.
也许您的计算机速度很慢,因此加载需要时间。
If you start using xamarin for the first time如果您是第一次开始使用 xamarin
if it didn't added just restart Visual Studio (should change "Run" into name of the device)如果没有添加,只需重新启动 Visual Studio(应将“运行”更改为设备名称)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.