Visual Studio Android模拟器网络无法正常工作 [英] Visual Studio Android Emulator network not working

查看:443
本文介绍了Visual Studio Android模拟器网络无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始在Visual Studio中使用xamarin,并安装了Visual Studio Android模拟器.仿真器可以完美地运行,但是不能正常运行.在设置中,它表示已连接,但浏览器无法打开网站.我启动了Windows Phone仿真器,并且网络正常运行.当我启动android仿真器时,它添加了两个网络适配器(参见图片).在Android模拟器的hyper-v虚拟设备设置中,内部网络适配器设置为Windows Phone适配器(见图),外部设置为Realtek.我尝试删除所有虚拟交换机,删除仿真器并再次进行遍历,但没有任何帮助.我认为问题出在android模拟器或hyper-v设置中,因为Windows Phone模拟器可以正常工作(它使用相同的内部适配器,但在hyper-v设置中没有外部适配器).有谁知道如何解决这个问题?提前致谢!

I started using xamarin in visual studio, and I installed visual studio android emulator. Emulator works flawlessly, but network on it doesn't. In settings it says it's connected, but browser can't open websites. I started windows phone emulator, and there network works without problem. When I started android emulator, it added two network adapters (see picture). In hyper-v virtual device settings for Android emulator, internal network adapter is set to windows phone adapter (see on picture), and external is set to Realtek bla bla bla. I tried deleting all virtual switches, deleting emulator and going all over again, and nothing helps. I assume the problem is in android emulator or hyper-v settings, because windows phone emulator works all right (it uses same internal adapter, but has no external in hyper-v settings). Does anyone have idea how to solve this? Thanks in advance!

推荐答案

似乎安装了适用于Android的Visual Studio模拟器可能出了问题.您可以在Hyper-V管理器中检查网络"设置.

Seems like the installation of the Visual Studio Emulator for Android might have gone wrong. You can check the Network settings in the Hyper-V manager.

对于我使用的两个图像,它看起来像这样

For the two images I use it looks like this

内部网络适配器

外部网络适配器

因此问题可能出在外部"设置上,因为它无法连接到互联网.

So the problem might be something with the External setting as it can't connect to the Internet.

我看到您有一个虚拟交换机,该交换机与我的Intel NIC的交换机相似.如果转到右侧选项菜单中的虚拟交换机管理器",则虚拟交换机的虚拟交换机属性"应如下所示:

I see you have a virtual switch which is similar to the one I have for my Intel NIC. If you go to Virtual Switch Manager in the options menu on the right, the Virtual Switch Properties for your virtual switch should look like this:

这篇关于Visual Studio Android模拟器网络无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆