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


当前回答

I have Mac OS X 10.7.2, Eclipse Helios Service Release 2. I also work via Proxy and my IP settings are via DHCP. I solved this issue firstly using this article http://www.gitshah.com/2011/02/android-fixing-no-internet-connection.html, then I removed Emulator settings and just go to Run->Run Configurations->Target->Additional Emulator Command Line Options and type there -http-proxy xxx.xx.111.1:3128 . Also I would like to say that when I typed also a DNS like this: -dns-server xxx.xx.111.1 -http-proxy xxx.xx.111.1:3128 it did not work, but when I removed DNS it worked. Also I would like to note, that Additional Emulator Command Line Options are not visible without scrolling to the bottom of that window. I also want to note, that when you change emulator options, all apps will work. But If you write Additional Emulator Command Line Options, you need to write them every time for every app target in Run Configurations.

其他回答

在尝试了以上所有的解决方案后,我发现在mac os x上:

您必须在系统首选项>> network >> gear图标中检查网络设备的顺序 您必须在/etc/resolv.conf中检查DNS服务器的顺序

然后重新启动你的android模拟器,它应该工作。

检查你是否使用多个互联网连接到你的电脑,比如一个是局域网第二个是调制解调器,所以禁用所有的局域网或调制解调器。

如何设置Android模拟器的Internet选项?

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

转到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/

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