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


当前回答

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

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

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

其他回答

为了使用互联网通过代理模拟器尝试这些步骤,它为我工作:

进入设置->无线和网络->移动网络->接入点名称。 按菜单键。将出现一个选项菜单。

从选项菜单中选择新建APN。

单击“名称”。提供名称apn说我的apn。

点击APN。输入www。

点击代理。输入您的代理服务器IP。您可以从Internet explorer Internet选项菜单中获得它。

单击Port。输入端口号,在我的例子中是8080。您可以从Internet explorer Internet选项菜单中获得它。

单击User-name。以域名\user-name格式提供用户名。通常是你的系统登录。

点击密码。提供您的系统密码。

再次按菜单键。将出现一个选项菜单。

按下保存并尝试打开浏览器。我想这对你有帮助。

如果您在SDK管理器的工具->选项下是代理,则不要配置代理设置。 当你从命令行运行时,添加-http-proxy:

emulator.exe -avd YOUR_AVD_NAME_HERE -http-proxy PROXY:PORT

为我工作。

是的——在win7中使用管理员privs启动模拟器,一切都会很好——或者至少你会在android中获得无线。

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

我解决了这个问题,我禁用了所有的网络连接,除了我正在使用的wifi连接,然后将剩余的启用连接的属性设置为静态分配的DNS地址。(没有DHCP)这是Win7 64bit