如何将我的Android模拟器连接到互联网,例如使用浏览器?我已经找到了很多关于如何通过代理连接的建议,但这里不是这样,我的机器(Windows 7)是直接连接到路由器的。
当前回答
我的平台:Mac OS 10.6.4 Eclipse: 3.6
我也遇到过类似的问题,我的地图应用程序背景是灰色的(没有磁贴),浏览器无法连接到互联网。
在Eclipse中,我去运行配置->目标,并添加“-dns-server X.X.X.X”,之后一切都工作正常。(显然,X.X.X.X是我的DNS服务器的IP地址)。
其他回答
在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.
我也有类似的问题。我安装了一个需要INTERNET权限的应用程序(并使用了它),然后突然就工作了。
朋友们,还要检查一下你是否在某个地方没有通过VPN连接,因为它也会干扰互联网连接。
blacharnia
在Android模拟器中,打开飞机模式,然后再关闭,对我来说很管用。
我在android 4.4上采取了以下措施: 设置->无线和网络->移动网络 ->确认已开启“数据开启”和“数据漫游”。
推荐文章
- 如何增加Android模拟器的存储?(INSTALL_FAILED_INSUFFICIENT_STORAGE)
- 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模拟器