的WebView和本地主机 [英] WebView and localhost

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

问题描述

我收到google.com我的WebView在里面,但我没有得到我该本地主机。
任何人可以帮助我吗?

I am getting google.com inside my WebView, but am not getting my localhost in that. Can anybody help me?

推荐答案

使用10.0.2.2代替。这是一个特殊的IP地址,该模拟器击溃你的开发计算机上的本地主机。假设仿真器和Web服务器在同一台计算机上运行。

Use 10.0.2.2 instead. This is a special ip address that the emulator routs to local host on your dev machine. assuming that emulator and the webserver are running on the same machine.

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

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