[英]Android app loading white screen on device
I've debugged my app on my PC and it works fine. 我在我的电脑上调试了我的应用程序,它工作正常。 When I go into my phone and tablet instead of it loading the WebView
like it should it simply loads a white screen, I guess failing to load the web site. 当我进入我的手机和平板电脑而不是它加载WebView
它应该只是加载一个白色的屏幕,我想无法加载网站。 I'm not sure where to begin debugging since my debug mode and virtual device works fine. 我不知道从哪里开始调试,因为我的调试模式和虚拟设备工作正常。 Any suggestions? 有什么建议么?
A couple of suggestions based on these issues: 基于这些问题的一些建议:
The fact that it's working locally but not on device suggests either connection issues or permissions in my opinion. 它本地工作但不在设备上的事实表明我认为连接问题或权限。 The other option is that the html you're loading is corrupt and the browser on your device(s) are breaking on rendering them. 另一个选择是你加载的html已损坏,你设备上的浏览器在渲染它们时会中断。
Does your WebView require JavaScript? 您的WebView是否需要JavaScript? If so you'll need to enable it. 如果是这样,您将需要启用它。
webView.getSettings().setJavaScriptEnabled(true);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.