如何从 VS Android Emulator 连接到 localhost

时间:2023-04-22
本文介绍了如何从 VS Android Emulator 连接到 localhost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在尝试连接到我正在启动 VS Android 模拟器的机器的本地主机.当 Android 版本是 Kitkat 时,我能够成功连接到 IIS 服务器.但是,当 VS Android 版本是 Lollipop 或 Marshmallow 时,我无法连接.我连接到 localhost 的方式是在模拟器的浏览器中输入

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.

解决方案

VS studio Emulator work very fine and fast

see the screen shot that how you can connect VS Emulator to localhoat

这篇关于如何从 VS Android Emulator 连接到 localhost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

上一篇:MediaRecorder 在启动时崩溃 下一篇:从命令行创建一个大小合适的模拟器

相关文章