Visual Studio - Xamarin - Emulator black screen/

陌路散爱 提交于 2020-01-03 16:48:44

问题


I decided to install xamarin the other day so I could start coding in c#. So far it's been an absolute nightmare getting anything to work. I downloaded the xamarin bundle that visual studio offers and now I'm trying to simply run a test app and the emulator won't work.

I've looked at every video online, & tried to read through as many forums as possible but at this point I need direct help before I throw my computer into the pool(jk)

I've downloaded android emulator & installed almost all the devices & made sure to install all the packages in the android sdk. I created a new device from the vds manager but I STILL get errors. this is the message I get waiting for the emulator to start, I don't see the android splash either

still waiting


回答1:


Have you tried to edit the emulator properties and to check the "Use Host GPU Option"? I had that issue too and that option solves the problem




回答2:


I got stuck on this for a while until the basic issue was I simply was not waiting long enough. Keep an eye on your Visual Studio build window, and watch all the slow messages as the come up.. it takes around 3-5 minutes on a blank project for the first time on a intel i5 with 8GB ram.... so the trick really in my case was to be patient. I think it gets faster second time round as it remembers some of the hard work it did the fist time to get it to work.




回答3:


I enabled Hyper-V acceleration based on microsoft documentations: https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin&pivots=windows#accelerating-with-hyper-v

Basically you need to turn on these two windows features from the control panel (Turn windows features on of off):

  • Hyper-V.
  • Windows hypervisor platform.

then from visual studio go to: Tools >> Android >> Android SDK manager >> Tools >> make sure that "Android emulator" version is 27.0.1 or higher, if not, you will find in the same screen a button below to update it.

I did this on windows 10 64-bit, with VS 2017 Community 15.9.5



来源:https://stackoverflow.com/questions/45539368/visual-studio-xamarin-emulator-black-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!