Android开发经验谈Android技术知识Android开发

android高版本WebView多进程崩溃问题解决策略

2020-09-08  本文已影响0人  im_the_best

最近在将工程海外版targetVersion升到10之后发现线上出现一个数量级很高的崩溃:

"Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377 : Current process...“

参考了谷歌的Webview.setDataDirectorysuffix()方案,却引入了“webview already inited”WebView已经初始化的新问题,最后经过不断的分析,终于敲定

把Webview.setDataDirectorysuffix()放在application的attach生命周期

解决了这个问题,下面的复盘供大家参考。

场景复盘:

上一篇 下一篇

猜你喜欢

热点阅读