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


当前回答

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

其他回答

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

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

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

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

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

希望能有所帮助!

it appears there might be a few reasons why there might be no internet connection for an emulator, in my case i was working from home where i have a wireless connection then came into the office and plugged in direct, however although my wireless connection was disconnected it was not disabled resulting in no emulator connection. my understanding is that when it starts up it looks for a network adapter and if there is any conflict here it might result in no internet connection. to resolve go to Start > Settings > Network Connections right click on Wireless Network Connection (if you are not using wireless) and select disable

在eclipse中转到DDMS

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

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

我的平台:Mac OS 10.6.4 Eclipse: 3.6

我也遇到过类似的问题,我的地图应用程序背景是灰色的(没有磁贴),浏览器无法连接到互联网。

在Eclipse中,我去运行配置->目标,并添加“-dns-server X.X.X.X”,之后一切都工作正常。(显然,X.X.X.X是我的DNS服务器的IP地址)。