title: Inflating layout XML on Android
body: <p>I have error inflating button in XML. It's quite unique, among 10k users only couple of crashes. One for Android 9, another Android 8. Devices are Google Pixel 2l and Nexus 5x. </p>
  
  <p>So I guess in general code is fine, but no ideas how to debug on specific devices. </p>
  
  <p>Fatal Exception: </p>
  
  <pre><code>&gt; java.lang.RuntimeException Unable to start activity ComponentInfo{}:
  &gt; android.view.InflateException: Binary XML file line #21: Binary XML
  &gt; file line #21: Error inflating class Button
  &gt; android.app.ActivityThread.performLaunchActivity
  </code></pre>
  
  <p>This is the <code>Button</code></p>
  
  <pre><code>&lt;Button
              android:id="@+id/constraintLayout"
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_marginEnd="32dp"
              android:layout_marginStart="16dp"
              android:background="@color/colorAccent"
              android:drawableStart="@drawable/navigation_back"
              android:onClick="backListener"
              android:stateListAnimator="@null"
              android:text="@string/survey_register_driver"
              android:textAllCaps="false"
              android:textSize="18sp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"&gt;
  
          &lt;/Button&gt;
  </code></pre>