如何将我的Android模拟器连接到互联网,例如使用浏览器?我已经找到了很多关于如何通过代理连接的建议,但这里不是这样,我的机器(Windows 7)是直接连接到路由器的。


当前回答

是的——在win7中使用管理员privs启动模拟器,一切都会很好——或者至少你会在android中获得无线。

其他回答

I think some of the answers may have addressed this, however obliquely, but here's what worked for me. Assuming your problem is occurring when you're on a wireless network and you have a LAN card installed, the issue is that the emulator tries to obtain its DNS settings from that LAN card. Not a problem when you're connected via that LAN, but utterly useless if you're on a wireless connection. I noticed this when I was on my laptop. So, how to fix? Simple: Disable your LAN card. Really. Just go to your Network connections, find your LAN card, right click it and choose disable. Now try your emulator. If you're like me, it suddenly ... works!

我也遇到过同样的问题。 我找到的最简单的解决方法是:

转到Android\Sdk\emulator文件夹,打开命令提示符。 输入emulator -list-avds查看可用的模拟器名称。 输入模拟器-avd name-of-your-device -netdelay none -netspeed full -dns-server 8.8.8.8命令,按“enter”。

我在Win7 64位上遇到了类似的问题。尝试禁用我的hamachi和virtualbox适配器,但没有工作。尝试以管理员身份启动avd,但没有工作。最后,我使用这个网站上的信息禁用了teredo隧道适配器,它工作了: http://www.mydigitallife.info/2007/09/09/how-to-disable-tcpipv6-teredo-tunneling-in-vista/

我不确定这是否是你的问题,但这是我解决我的问题的方法。

在启动模拟器时,我总是有这个“没有找到DNS服务器”的错误,并对谷歌进行了大量的研究,但无济于事。不管怎样,我在某个地方发现了一个帖子(再也找不到它了),它说nic的数量,DNS条目的数量会影响模拟器。此外,知道模拟器使用Windows API函数(GetNetworkParams())来解析DNS条目,我不能依赖于% Windows %\System32\Hosts文件。

然而,我在nic属性中(在Windows 7上)发现我指定了一个静态IP,但没有DNS条目。因此,我从路由器获取了DNS条目,并将它们插入NICs属性中。我重新启动模拟器,现在它正在使用正确的DNS条目!

我现在可以使用模拟器的互联网连接,它的工作效果非常好!

希望能有所帮助!

我有这个问题,由于网络变化后,我打开模拟器。如果您在启动模拟器后更改了WiFi,则只需重新启动模拟器即可获得互联网访问