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


当前回答

我以为我在连接模拟器到互联网时遇到了问题,但事实证明是我使用的代码有问题。我知道这是显而易见的,但首先在模拟器上尝试浏览器,以确认你没有互联网接入。如果我先做那件事,我就可以节省一个小时。

其他回答

我发现在我从Vista x64重建到Win7 x64后,用“擦除用户数据”启动模拟器为我清除了这个问题。

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!

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

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

为我工作。

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

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