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


当前回答

右键单击Eclipse中的Project select Run As -> Run Configurations… 选择Android应用程序,然后选择“目标”标签 寻找“附加模拟器命令行选项”并将此命令行放入文本框 -http-proxy http://< username >:< password >@< hostname >:< port > .使用实例

其他回答

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

我有一台windows 7(64位)的机器,我的模拟器不能工作。在四处寻找之后,我最终静态地将我的路由器添加到网络DNS属性(192.168.1.1)。它开始起作用了。

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

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

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

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

希望能有所帮助!

我发现在我从Vista x64重建到Win7 x64后,用“擦除用户数据”启动模拟器为我清除了这个问题。

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!