Pawel Pabich
Pawel Pabich

Reputation: 2434

How to connect Visual Studio 2015 Android Emulator to network?

I've recently installed VS 2015 RC and the Android Emulator seems to work great(it is very fast :)) except it can not connect to network. According to http://blogs.msdn.com/b/visualstudioalm/archive/2015/04/29/visual-studio-emulator-for-android-in-vs2015-rc.aspx the emulator should be able to connect to my WiFi card. I had a look at the emulator in Hyper-V Admin UI and it is configured in the same way as Windows Phone Emulator which works just fine. Any ideas?

enter image description here

Upvotes: 14

Views: 20782

Answers (5)

Iman
Iman

Reputation: 18966

for my 5.2" Marshmallow (6.0.0) (android 6.0 - API 23) in VS 2017 after connecting Wifi and answering the question for Connecting the Emulator to network I got my virtual eth2 wifi which is visible as a wifi when you slide down the upper toolbar which you usually see if your networks are connected or not.

but in my previous tries this icon shows an exclamation mark and no internet is shown beside it , after restarting and rerunning the emulator it works

Visual Studio android emulator WiFi Icon

Another useful points is in the network settings which my Hyper-V vEthernet with following name and note that under connectivity it shows internet access with Status of AndroidAPs7 which is name of WiFi connection and my Main Wi-Fi only shows bridged .

  • vEthernet (1x1 11b g n Wireless LAN PCI Express Half Mini Card Adapter Virtual Switch)

enter image description here

Upvotes: 0

Rosberg Linhares
Rosberg Linhares

Reputation: 3687

My environment is a nested virtualization as follows:

Physical machine (WinServer2016) -> VM (WinServer2016) -> VS Emulator for Android

The only thing that worked for me was running the following command in the physical machine:

Set-VMNetworkAdapter -VMName $vmName -MacAddressSpoofing on

Where $vmName is the name of the WinServer2016 VM.

Upvotes: 0

Pawel Pabich
Pawel Pabich

Reputation: 2434

Thanks guys for ideas. I uninstalled both Xamarin Android Player and Genymotion and now the VS Emulator works!

Upvotes: 5

John Engel-Kemnetz
John Engel-Kemnetz

Reputation: 2565

First, try disabling any virtual Ethernet adapters that aren't being used (eg. those used by Virtual Box). Next, go to Hyper-V Manager and delete any virtual switches then restart the emulator.

Upvotes: 6

Monomachus
Monomachus

Reputation: 1478

I had the same problem, when installed RC tools to a PC that had Genymotion previously installed, so what I did was disable the VirtualBox Host-Only Ethernet Adapters (that Genymotion used), and restarted the emulator, then the network on emulator was working

Device Manager disabled network adapters

Upvotes: 19

Related Questions