问题描述
我安装了Android Studio 1.0.1,并遵循了此页面 https://developer.chrome.com/multidevice/webview/gettingstarted 将网站包装到应用程序中.
I installed Android studio 1.0.1 and followed this page https://developer.chrome.com/multidevice/webview/gettingstarted to wrap a website to an app.
但是,在模拟器中运行它时出现以下错误.
However, I got the following error when running it in emulator.
由于以下原因,无法加载https://.....上的网页:
The webpage at https://..... could not be loaded because:
net :: ERR_NAME_NOT_RESOLVED
net::ERR_NAME_NOT_RESOLVED
但是,我尝试单击该链接,它没有任何问题地在Chrome中启动了网站.
However, I tried to click the link and it launched the website in Chrome without any problem.
推荐答案
这听起来似乎很明显,但是请确保在模拟器中打开3G:
This may sound kind of obvious, but make sure 3G is turned on in your emulator:
要这样做,请打开Cellular Data(打开右侧的开关):
To do so, turn on Cellular Data (on is the switch to the right):
然后注意3G符号显示在信号强度符号上方:
Then notice the 3G symbol shows up above the signal strength symbol:
我一直在尝试管理连接状态,偶然发现了这个问题,并且知道这是导致该错误的可能原因.有点晚了,但希望可以帮助某人.
I've been trying to manage connection state and stumbled onto this question and know that's a possible reason for that error. It's a little late, but hopefully helps someone down the line.
这篇关于在Android Studio的模拟器中运行的WebView无法访问互联网,但是Chrome可以访问互联网吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!