Visual Studio 2015 CTP5 Android 模拟器环回本地主机? [英] Visual Studio 2015 CTP5 Android Emulator loopback to localhost?

查看:27
本文介绍了Visual Studio 2015 CTP5 Android 模拟器环回本地主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 VS 2013 连接新的 VS2015 Android Emulator.这现在似乎有效,我可以调试、设置断点等,这一切都很好.(现在,我会使用 VS2015,但它不会正确部署 - 没关系).我还在我的机器上开发服务器应用程序,并使用 Fiddler 作为 http 调试帮助.. 我确信这不是罕见的情况.

I am using VS 2013 to connect with the new VS2015 Android Emulator. This seems to work now and I can debug, set breakpoints etc which is all fine. (Now, I would use VS2015 but it won't deploy properly -never mind). I am also developing the server app on my machine and using Fiddler as an http debug aid.. not an uncommon situation I am sure.

服务器正在使用 IIS Express 运行(也在 VS 2013 的另一个实例中调试),并且我已将绑定添加到 applicationhost.config,因此 IISExpress 服务器在我的 LAN 上从其他 PC 上可见,我已经检查过它是可见.

The server is running (also under debug in another instance of VS 2013) using IIS Express and I have added bindings to the applicationhost.config so the IISExpress server is visible on my LAN from other PC's and I've checked it is visible.

尽我所能,我似乎无法让模拟器将 http 请求发送回我的计算机.我的 javascript 使用 servicebase 来保存 url:

Try as I might I can not seem to get the Emulator to send the http requests back to my computer. My javascript uses a servicebase to hold the url:

var serviceBase = 'http://192.168.2.4:64963/'; //'http://169.254.220.177:64963/';  //'http://10.0.2.2:64963/'; //'http://localhost:64963/';

评论的那些显示了我尝试过的那些.这些都不起作用..第一个是我机器在 LAN 上的 IP,其余的是我在这里或 Android 开发网站上找到的各种 IP.我也试过:

The commented ones show the ones I have tried. None of these works.. the first is the IP of my machine on the LAN, the rest are various ones I have picked up here or the Android dev site.. I have also tried:

http://mymachinename:64963

因为我从这个 URL 带来了 web 和 API 服务,所以我也在我的真正的 android 手机上尝试了一个 chrome 浏览器(通过我局域网上的 wifi),但这也无法到达我的开发机器(我的其他电脑的能够).所以我知道它可能无法解析名称?但真的不确定下一步要去哪里?我想知道我 PC 上的 Hosts 文件,但不确定我是否可以/应该将 IP 地址设置为主机名?..任何指针?谢谢,布雷特

Because I am bringing both web AND API services from this URL I have also tried a chrome browser on my real android phone (over wifi on my LAN) and this can't get to my dev machine either (where my other pc's can). So I get that it probably can't resolve the names? But really not sure where to go next? I wondered about the Hosts file on my PC but not sure if I can/should set an IP address as a host name? .. any pointers? Thanks, Brett

推荐答案

169.254.80.80 是本地主机环回.

通过转到 Android VS 模拟器中的其他工具(单击右侧的 >> 按钮)并选择网络选项卡,您将获得有关网络的所有信息连通性.

By going to Additional Tools in the VS emulator for Android (click the >> button on the right hand side) and selecting the Network tab, you will get all the information about the network connectivity.

对于本地主机环回,请使用桌面适配器 #2 下列出的地址.桌面适配器 #1 应该也能工作,它是您机器的 IP 地址.

For the localhost loopback, use the address listed under the Desktop Adapter #2. Desktop Adapter #1 should work as well, which is the IP address of your machine.

这篇关于Visual Studio 2015 CTP5 Android 模拟器环回本地主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆