android - 如何从 VS Android 模拟器连接到本地主机

标签 android android-emulator localhost emulation visual-studio-emulator

我正在尝试连接到我正在启动 VS Android 模拟器的机器的本地主机。当 Android 版本为 Kitkat 时,我能够成功连接到 IIS 服务器。但是,当 VS Android 版本为 Lollipop 或 Marshmallow 时,我无法连接。我连接到本地主机的方式是输入 http://169.254.80.80在模拟器的浏览器中。根据 http://developer.android.com/tools/devices/emulator.html#networkaddresses我应该能够使用 IP 地址 10.0.2.2 连接到本地主机。但是,这个 IP 地址似乎对我不起作用。

最佳答案

VS studio Emulator 工作得非常好而且速度很快

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

enter image description here

关于android - 如何从 VS Android 模拟器连接到本地主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34779282/

相关文章:

java - 如何避免在 android Kitkat 4.4 中长按时默认选择?

Android:替换 WebView 中的 HTML 标签

java - 我的 gif 图像在模拟器中显示,但在我的智能手机中丢失

php - 从本地网站执行 PHP 时,Windows 7 上 IIS 的本地主机上的 mysqli_connect 失败

RecyclerView 中的 Android 调色板

android - 没有找到 android sdk (Unity)

Android:从物理设备连接到模拟器上的套接字服务器

java - Android Studio 模拟器不会运行简单的 Hello World 应用程序

node.js - 如何在 Xampp localhost 上安装 nodejs

android - 如何在Android设备中访问LAMP localhost进行测试?