Android模拟器和本地站点 [英] android emulator and local site

查看:148
本文介绍了Android模拟器和本地站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜 我已经开始Android模拟器的应用程序,并试图从嵌入式浏览器在本地启动网站打开,但本地DNS名称(从/ etc / hosts中)没有得到解决。是否有任何选项来启用本地解决?

Hi I've started android emulator app and trying to open from embeded browser locally started web-site, but local dns name (from /etc/hosts) is not resolved. Is there any option to enable local resolving?

推荐答案

请参阅此网址。问题是127.0.0.1是不正确的IP访问的仿真器的本地服务器站点。

Refer this URL. The issue is 127.0.0.1 is not the correct IP for accessing local server sites on emulator.

http://localhost:8080/MyTestPage.html // URL to use in computer browser
http://10.0.2.2:8080/MyTestPage.html  // URL to use in emulator browser

不过,你需要做一些配置变化的URL建议。

However, you need to do some configuration changes as suggested in the URL.

这篇关于Android模拟器和本地站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆