如何将我的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
推荐文章
- 在WebView中上传文件
- 如何增加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仿真目前需要硬件加速