Error inflating WebView XML

前端 未结 7 1524
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-04 00:10

I found a crash report on Crashlytics in a Samsung SM G920F (Galaxy S6), version 5.1.1 (on all other devices I didn\'t retrieve same error).

java.lang.Runtim         


        
7条回答
  •  执念已碎
    2021-01-04 00:49

    I got the same error on my crashlytics.

    After some searches on Google, it seems that this can happen when the user has no webview installed on the phone.

    That sounds weird as the webview is a system package, but there is a bug where it is actually possible when the webview package is being updated while the user is using the app. It does not work on all phones, so it can be reproduced on some specific devices (I guess Samsung ones mostly...), but not on others.

    I do not remember exactly the step do reproduce it, but something like:

    • start the app
    • go to play store and uninstall the web view updates
    • start to install the updates and switch back to the app
    • on some devices, at the end of the update, the app restart and it works well. On some, the bug appears and if you try to load the webview, it crashes.

    Not sure how to deal with it. I guess you can look whether the package exists or register to be notified on package updates to reload the app. In my case, it is really a corner case and happened once or twice, I do not think it requires to work on fixing the issue. If it happens more often, maybe some actions are necessary.

提交回复
热议问题