如何从 VS Android Emulator 连接到 localhost

How to connect to localhost from VS Android Emulator(如何从 VS Android Emulator 连接到 localhost)
本文介绍了如何从 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

How To Create a Rotating Wheel Control?(如何创建转轮控件?)
How to avoid restarting activity when orientation changes on Android(如何在 Android 上的方向更改时避免重新启动活动)
Screen orientation lock(屏幕方向锁定)
Strange behavior with android orientation sensor(android方向传感器的奇怪行为)
Android: Rotate image in imageview by an angle(Android:将imageview中的图像旋转一个角度)
Activity restart on rotation Android(旋转Android上的活动重启)