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


当前回答

您尝试过使用管理权限启动模拟器吗?它适用于我,我运行的是Windows 7 64bit)

其他回答

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!

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

我认为有时候重启虚拟设备就足够了。: -)

环境:Windows 7 64位

在我的例子中,我必须在verbose模式下运行模拟器(emulator -verbose -avd Nexus_6_API_25)来找出模拟器检测到两个DNS服务器的事实,如下所示。

模拟器:找到2个DNS服务器:192.168.3.227 192.168.1.1

在检测到的两个DNS服务器中,只有一个有互联网连接,这是模拟器无法上网的原因。

为了成功连接android模拟器到互联网,没有互联网连接的DNS服务器必须从控制面板\网络和互联网\网络连接中禁用

读完这篇文章后,我决定看看我的“网卡”。我把它放在引号里,因为像许多人一样,我正在为Hamachi和virtual Box等设备运行虚拟网卡。在我禁用了Hamachi之后,我可以使用互联网了。我的猜测是模拟器选择第一个可用的nic,而不管它是否是虚拟的。现在来看看我是否可以重新安排我的nic订单而不撕裂我的盒子。

Windows 7 32位