如何将我的Android模拟器连接到互联网,例如使用浏览器?我已经找到了很多关于如何通过代理连接的建议,但这里不是这样,我的机器(Windows 7)是直接连接到路由器的。
当前回答
您需要使用“控制面板\所有控制面板项\网络连接”与模拟器共享您的笔记本电脑Internet,并选择笔记本电脑的活动Internet源,然后右键单击然后共享选项卡。在这里勾选共享复选框,如果需要,选择模拟器网络,如果列出。
其他回答
我也有类似的问题。我安装了一个需要INTERNET权限的应用程序(并使用了它),然后突然就工作了。
朋友们,还要检查一下你是否在某个地方没有通过VPN连接,因为它也会干扰互联网连接。
blacharnia
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.
在尝试了以上所有的解决方案后,我发现在mac os x上:
您必须在系统首选项>> network >> gear图标中检查网络设备的顺序 您必须在/etc/resolv.conf中检查DNS服务器的顺序
然后重新启动你的android模拟器,它应该工作。
我也遇到过同样的问题。 我找到的最简单的解决方法是:
转到Android\Sdk\emulator文件夹,打开命令提示符。 输入emulator -list-avds查看可用的模拟器名称。 输入模拟器-avd name-of-your-device -netdelay none -netspeed full -dns-server 8.8.8.8命令,按“enter”。
我有这个问题,由于网络变化后,我打开模拟器。如果您在启动模拟器后更改了WiFi,则只需重新启动模拟器即可获得互联网访问
推荐文章
- 如何增加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模拟器