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


当前回答

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

Windows 7 32位

其他回答

在eclipse中转到DDMS

在DDMS下选择模拟器控制,其中包含电话状态 在电话状态包含数据——>选择Home,这将启用您的互联网连接,如果您想禁用模拟器的互联网连接,那么——>选择None

(注意:只有当运行eclipse的PC/笔记本电脑有活跃的internet连接时,才会启用internet连接。)

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.

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

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

我也有类似的问题。我安装了一个需要INTERNET权限的应用程序(并使用了它),然后突然就工作了。

朋友们,还要检查一下你是否在某个地方没有通过VPN连接,因为它也会干扰互联网连接。

blacharnia

我的服务订单首选项是正确的(Wi-Fi是第一个),但仍然无法连接。

答案是,从霹雳桥转弯:

系统参数>网络>霹雳桥

然后将“配置IPv4”设置为“关闭”,并应用您的更改。

不需要在模拟器中摆弄访问点。