如何将我的Android模拟器连接到互联网,例如使用浏览器?我已经找到了很多关于如何通过代理连接的建议,但这里不是这样,我的机器(Windows 7)是直接连接到路由器的。
当前回答
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
其他回答
我认为有时候重启虚拟设备就足够了。: -)
我在Win7 64位上遇到了类似的问题。尝试禁用我的hamachi和virtualbox适配器,但没有工作。尝试以管理员身份启动avd,但没有工作。最后,我使用这个网站上的信息禁用了teredo隧道适配器,它工作了: http://www.mydigitallife.info/2007/09/09/how-to-disable-tcpipv6-teredo-tunneling-in-vista/
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!
在eclipse中转到DDMS
在DDMS下选择模拟器控制,其中包含电话状态 在电话状态包含数据——>选择Home,这将启用您的互联网连接,如果您想禁用模拟器的互联网连接,那么——>选择None
(注意:只有当运行eclipse的PC/笔记本电脑有活跃的internet连接时,才会启用internet连接。)
在Android模拟器中,打开飞机模式,然后再关闭,对我来说很管用。
推荐文章
- 新版本的Android模拟器问题-模拟器进程已终止
- Android模拟器只显示黑屏和adb设备显示“设备离线”
- 在Android Studio的模拟器上截图
- 使Android模拟器运行得更快
- Android Studio错误:“Manifest合并失败:针对Android 12的应用程序”
- 我如何在Android模拟器中“摇动”Android设备以调出开发菜单来调试我的React Native应用程序
- 错误“与adb的连接中断,发生严重错误。”
- 从Android模拟器访问localhost:端口
- Android模拟器在Android Studio中被杀死
- 以编程方式在视图上添加填充
- 如何连接安卓模拟器到互联网
- 模拟器:ERROR: x86仿真目前需要硬件加速
- 运行新的Intel Android模拟器
- Android模拟器不需要键盘输入- SDK工具rev 20
- 如何在Android模拟器中连接本地主机?