3

I have WebView on my application and I got many same errors on android 7.0 from users while inflating WebView fragment.

Error log:

android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class android.webkit.WebView Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class android.webkit.WebView

WebView fragment layout:

<android.support.v7.widget.LinearLayoutCompat 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background">

    <WebView
        android:id="@+id/wvAparat"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="16dp" />

</android.support.v7.widget.LinearLayoutCompat>

I got this error from these devices:

SM-G950F Android 7.0

SM-J330F Android 7.0

Moto E (4) Plus Android 7.1.1

Community
  • 1
  • 1
FarshidABZ
  • 3,860
  • 4
  • 32
  • 63

1 Answers1

0

It's definitely device related. here is a link for more information: https://www.androidpolice.com/2016/07/20/google-explains-chrome-will-become-webview-android-7-0/

My hunch would be, if you find one of these devices, to check if they have Chrome installed. If not, that's your answer. No idea for a workaround.

Radu
  • 2,076
  • 2
  • 20
  • 40