如何从VS Android仿真器连接到本地主机
我试图连接到我要从中引导VS Android仿真器的计算机的本地主机.当Android版本为Kitkat时,我能够成功连接到IIS服务器.但是,当VS Android版本是Lollipop或棉花糖时,我无法连接.我连接到本地主机的方式是在仿真器的浏览器中键入 http://169.254.80.80 .根据 http://developer.android.com/tools/devices/emulator.html #networkaddresses 我应该能够使用IP地址10.0.2.2连接到本地主机.但是,此IP地址似乎不适用于我.
I am attempting to connect to the localhost of the machine from which I am booting a VS Android Emulator. I am able to successfully connect to the IIS Server when the Android version is Kitkat. However, I fail to connect when the VS Android Version is Lollipop or Marshmallow. The way I am connecting to the localhost is typing http://169.254.80.80 in the browser of the Emulator. As per http://developer.android.com/tools/devices/emulator.html#networkaddresses I should be able to connect to localhost using the IP address 10.0.2.2. However, this IP address doesn't seem to work for me.
在 http://developer.android.com/tools/devices/emulator.html#networkaddresses 不适用于Android的Visual Studio模拟器(嗯,除了最后一个,即标准本地主机) IP地址).
The network addresses specified on http://developer.android.com/tools/devices/emulator.html#networkaddresses will not work for the Visual Studio Emulator for Android (well, except the very last one, which is the standard localhost IP address).
预期地址169.254.80.80可作为回送主机的功能.在运行Lollipop(21)及更高版本的映像上,使用该地址连接回主机似乎存在一个错误.我已经为此内部记录了一个错误.
The address 169.254.80.80 is expected to work as a loopback to the host. There seems to be a bug regarding connectivity back to the host using that address on images running Lollipop (21) and above. I have logged a bug internally for this.