的WebView和本地主机主机、WebView

2023-09-07 16:01:34 作者:九夏忧伤

我收到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.

 
精彩推荐
图片推荐