为什么在超级应用程序中进行测试时,webview 会显示“无权限加载"错误? [英] Why is the webview displaying ‘no permission to load’ error when testing from within the super-app?

查看:37
本文介绍了为什么在超级应用程序中进行测试时,webview 会显示“无权限加载"错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 webview 组件在我的小程序中渲染网页.在模拟器中,该组件按预期工作,但是,当我在我的 android 应用程序上对其进行测试时,出现如图所示的错误.

I am using the webview component to render a webpage in my mini program. In the simulator, the component works as expected, however, when I test it on my android app, I get the error shown in the image.

推荐答案

请检查您是否在您的工作区的小程序配置部分中将您尝试访问的 URL 列入白名单.另请注意,模拟器支持显示本地托管的网页,但是,当您想在设备上进行测试时,您需要在线托管您的网站.

Please check to see if you have whitelisted the URL that you are trying to access in your mini program’s configuration section on your workspace. Please also note that the simulator supports displaying a webpage hosted locally, however, when you want to test on device, you need to host your site online.

这篇关于为什么在超级应用程序中进行测试时,webview 会显示“无权限加载"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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