简体   繁体   English

Android模拟器不起作用

[英]Android emulator doesn't work

I am new to Xamarin and trying to run the ' Hello, Android ' application found in the introductory chapter of the official on-line Xamarin guide (link here ). 我是Xamarin的新手,并尝试运行官方在线Xamarin指南( 此处链接)的介绍性章节中的“ Hello,Android ”应用程序。 I use Visual Studio Community 2017 (VS) . 我使用Visual Studio Community 2017 (VS)

I've created an Android Virtual Device (AVD) using Visual Studio's Android Emulator Manager tool. 我使用Visual Studio的Android Emulator Manager工具创建了一个Android Virtual Device (AVD) Here's a screenshot of the settings of the AVD I've set up: 这是我设置的AVD设置的屏幕截图:

在此输入图像描述

My hardware specs are: Intel Core2 Duo 8400, 5GB of DDR2 667MHz RAM. 我的硬件规格是:Intel Core2 Duo 8400,5GB DDR2 667MHz RAM。 I also use Win10 Enterprise. 我也使用Win10 Enterprise。

Now, when try to run my application I initiate the AVD from within VS and after waiting for at least 5 minutes get the following screenshot from the Android Emulator: 现在,当我尝试运行我的应用程序时,我从VS中启动AVD, 等待至少5分钟后,从Android模拟器获取以下屏幕截图:

在此输入图像描述

How can I troubleshoot this error? 如何解决此错误? As it is right now I simply cannot debug any Android application using Visual Studio and the specs described above. 就像现在一样,我根本无法使用Visual Studio和上述规范调试任何Android应用程序。

Update: 更新:

I installed the exact same software on my laptop. 我在笔记本电脑上安装了完全相同的软件。 The hardware specs of the laptop are: Core I5 4210U, 12GB DDR3 1600MHz. 笔记本电脑的硬件规格是:Core I5 4210U,12GB DDR3 1600MHz。

Now the emulator runs smoothly, but, although I installed the same software I get a different GUI for the AVD. 现在模拟器运行顺利,但是,虽然我安装了相同的软件 ,但我得到了AVD的不同 GUI。 Anyway, problem solved. 无论如何,问题解决了。 It seems the low hardware specifications was the issue. 似乎低硬件规格是问题所在。

在此输入图像描述

Update 2: 更新2:

It seems the AVD has problems. 看来AVD有问题。 The build process intermittently halts at this point: 此时构建过程间歇性地停止:

1 > Processing: obj\\Debug\\res\\layout\\main.xml 1>处理:obj \\ Debug \\ res \\ layout \\ main.xml

1 > Processing: obj\\Debug\\res\\values\\strings.xml 1>处理:obj \\ Debug \\ res \\ values \\ strings.xml

Also the sample application I tried to deploy (when the AVD starts) doesn't work. 我试图部署的示例应用程序(当AVD启动时)也不起作用。

Genymotion is an Android emulator that is free for personal use. Genymotion是一款Android模拟器,可供个人免费使用。 It is what I use and it works very well. 这是我使用的,它运作良好。 I would recommend trying that. 我建议尝试一下。

安装Intel HAXM并在AVD属性中启用Use Host GPU

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

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