Android studio 模拟器中运行的WebView 不能上网,Chrome 可以吗? [英] The WebView running in the emulator in Android studio cannot access internet, but Chrome can?

查看:46
本文介绍了Android studio 模拟器中运行的WebView 不能上网,Chrome 可以吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 Android studio 1.0.1 并关注此页面

为此,请打开蜂窝数据(打开的是右侧的开关):

然后注意 3G 符号显示在信号强度符号上方:

我一直在尝试管理连接状态并偶然发现了这个问题,我知道这可能是导致该错误的原因.有点晚了,但希望能帮助某人.

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.

Webpage not available

The webpage at https://..... could not be loaded because:

net::ERR_NAME_NOT_RESOLVED

However, I tried to click the link and it launched the website in Chrome without any problem.

解决方案

This may sound kind of obvious, but make sure 3G is turned on in your emulator:

To do so, turn on Cellular Data (on is the switch to the right):

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 可以吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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