Error inflating WebView XML

It seems that something strange ocurred when the app was inflating the WebView, could be whatever.

For the NameNotFoundException: com.google.android.webview I can deduce that could be a problem with the Google packages (The user could be using a custom ROM and not having them installed.)

If you had more info about the terminal with the error I'll say you go for it, but you have to see the proportion of users/users_with_this_error that you have. Then you could see if it's useful for you work in this issue or not.

From breakline's comment: Check out this post, looks kinda like the same issue: NameNotFoundException webview


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.