当前位置:网站首页>Record WebView shows another empty pit
Record WebView shows another empty pit
2022-04-23 07:13:00 【Drink dichlorvos alone】
Problem description
In today's app use webView Load web page . Suddenly, it can't be loaded .webView.getUrl() Can get what I want to load Url. But it just doesn't show the page I want to load . It can be displayed on the browser
Solutions
1. Because I have encountered similar problems before , It's a certificate problem , So I'll see if the last solution can solve .
Pictured

There is something wrong with the certificate , Select continue loading .
however , Still not solved
2. All kinds of Baidu , Try various schemes
such as
mWebSettings.setDomStorageEnabled(true);// Open the local DOM Storage
I thought it was html The page is too big , So I started the local DOM Storage try . But not yet
So I wanted to see if the cache was ok
mWebSettings.setAppCacheEnabled(true);// Whether to use cache
It turns out not
3. Calm down again , To analyze problems .
my webView The first time it can be opened , But another page opens ( It's also webView) after ( Another page can also be opened ), Open the first one again webView, You can't load it . I have an idea , I wonder if it's time to open another page ,webView Not destroyed ?
Because in the company webView It uses its own encapsulated tool class , Some steps may have been missed .
I'll find the source code , Sure enough !
So I added two lines . Pictured

When the user clicks back , Manually destroyed webView, At the same time, in the return event , Also destroyed , Pictured

Then follow the previous steps .
Open another page first , Then open the page I originally wanted to open , Found that you can open . Problem solving !
版权声明
本文为[Drink dichlorvos alone]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230606380124.html
边栏推荐
猜你喜欢

adb shell top 命令详解

组件化学习(1)思想及实现方式

【2021年新书推荐】Practical Node-RED Programming

补补网络缺口

【2021年新书推荐】Enterprise Application Development with C# 9 and .NET 5

从0开始封装一套项目的网络请求框架

一款png生成webp,gif, apng,同时支持webp,gif, apng转化的工具iSparta

JVM basics you should know

this. getOptions is not a function

ViewPager2实现画廊效果执行notifyDataSetChanged后PageTransformer显示异常 界面变形问题
随机推荐
MySQL5. 7 insert Chinese data and report an error: ` incorrect string value: '\ xb8 \ XDF \ AE \ xf9 \ X80 at row 1`
MySQL笔记3_约束_主键约束
AVD Pixel_2_API_24 is already running.If that is not the case, delete the files at C:\Users\admi
oracle通过触发器和序列来定义自增主键,并且设置定时任务每秒钟插入一条数据到目标表
谷歌AdMob广告学习
[sm8150] [pixel4] LCD driver
MySQL notes 5_ Operation data
adb shell top 命令详解
AVD Pixel_ 2_ API_ 24 is already running. If that is not the case, delete the files at C:\Users\admi
oracle生成毫秒级时间戳
npm ERR code 500解决
MySQL笔记4_主键自增长(auto_increment)
pg库查看某模式下某表的分布键
Itop4412 kernel restarts repeatedly
MySQL notes 4_ Primary key auto_increment
利用栈实现队列的出队入队
oracle用delete删除数据所需时间测试
一款png生成webp,gif, apng,同时支持webp,gif, apng转化的工具iSparta
iTOP4412 SurfaceFlinger(4.4.4_r1)
oracle视图相关