WebView Android无法加载URL

时间:2018-10-18 20:23:48

标签: android webview

我正在尝试加载此网址“ https://install.appcenter.ms/orgs/osp/apps/gettze/distribution_groups/public” 但是无法使用webview,代码如下:

mWebView.settings.javaScriptEnabled = true
mWebView.settings.loadsImagesAutomatically = true
mWebView.webViewClient = WebViewClient()
mWebView.loadUrl("https://install.appcenter.ms/orgs/osp/apps/gettze/distribution_groups/public")

In this image can you see the error msg, appear "Oops, you seem to be an unsupported browser, App Center works best when using Chrome on Android Devices" and I does not understand, because the WebView use the engine of chrome

1 个答案:

答案 0 :(得分:0)

在清单中添加互联网许可

WebView myWebView = (WebView) findViewById(R.id.webview); myWebView.loadUrl("https://install.appcenter.ms/orgs/osp/apps/gettze/distribution_groups/public");