android - WebView Android 不加载 URL
问题描述
我正在尝试加载此网址“ 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")
解决方案
在清单中添加互联网权限
WebView myWebView = (WebView) findViewById(R.id.webview); myWebView.loadUrl("https://install.appcenter.ms/orgs/osp/apps/gettze/distribution_groups/public");
推荐阅读
- actions-on-google - 启用智能显示器
- docker - 无法从 Jenkins 管道连接远程 docker 主机 api
- java - Android:将 CheckBox 状态存储在不同日期的 CheckList 中
- javascript - JS 创建 babel 插件:如何获取匿名函数的参数
- google-cloud-platform - 谷歌云中的Project和VPC有什么关系?
- css - 更改 noSelectionOption 选项的样式
- javascript - 拖动大元素时 Firefox 重影图像缩小
- google-bigquery - Google BigQuery 标准 SQL 插入具有嵌套行的嵌套行
- python - AttributeError:“模块”对象没有属性“PoolManager”
- node.js - 重构为 async/await