Xamarin.Forms Previewer “Connection is closed”

不羁岁月 提交于 2019-12-08 17:26:30

问题


Just opened the Xamarin.Forms Previewer and it says "Something went wrong, Connection is closed" Its a fresh Visual Studio 2017 install and a blank Xamarin Forms Project.

Here is a screenshot

Does anyone know how to solve this problem?


回答1:


Here's what worked for me.

  1. Make sure Android & Phone are selected in XF previewer.
  2. Now Close XF Previewer.
  3. Make sure your App.Android project is marked as the start up project.
  4. Restart VS
  5. Open the previewer again.

I have no idea why the above worked for me, but, who am I to complain when its working.




回答2:


The Xamarin.Forms Previewer in Visual Studio 2019 contains several improvements, many focused on making it more reliable. Now that VS2019 is out, please try it. That should fix this issue and others.



来源:https://stackoverflow.com/questions/46530226/xamarin-forms-previewer-connection-is-closed

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