android.view.InflateException Error inflating class android.webkit.WebView

If you use androidx.appcompat:appcompat:1.1.0, try androidx.appcompat:appcompat:1.0.2 instead.
it seems that 1.1.0 doesn’t fix the bug with WebView in Android 5.1.1.

Feb-2020 update: Reverting to 1.0.2 stopped working for many people (including my app), but using the current version of androidx.appcompat:appcompat:1.2.0-alpha02 did fix the crash. (I was seeing it on a Huawei P8 Lite running Android 5.0 during Google’s automated “Pre-launch report” testing).

Jun-2020 update: There are newer releases available than the one mentioned in the Feb-2020 update, you can see the currently available versions here:

Leave a Comment