Visual Studio Android Emulator network not working

喜欢而已 提交于 2019-12-02 13:00:01

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

Internal Network Adapter

External Network Adapter

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

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:

I just went through the same problem. First, do you have LAN and WiFi on your computer/laptop. If you do test it out by disabling the LAN in your Network settings or Computer hardware manager and connecting through WiFi. If that works then you have the same problem I had. This is caused because the Hyper-V Network Switch setup for the Android Emulator prefers to use the WiFi Connection of your computer when it sets up the Network Switch.

Solve this by:

  1. Uninstalling the Android Emulator from Visual Studio.

  2. Go into Hyper-V and delete the "VS Emulator..." VMs and the extra Virtual Network Switches created by the Android Emulator

  3. Disable your WiFi so you are ONLY connected by LAN

  4. Reinstall the Visual Studio Android Emulator

  5. Run Emulator and agree to let it setup the internet for you.

  6. Test the Emulator is connected to the internet by LAN.

  7. Shutdown the Emulator and re-enable your WiFi.

  8. Run the Emulator again and let it setup the internet for you again.

You can now re-enable your LAN or use your WiFi.

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