title: Android App crashes on older devices
body: <p>My app works perfectly on my phone. On some older devices it crashes though:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.blub.bla/com.blub.bla.MainActivity}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class ImageButton
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2572)
  ...
  Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class ImageButton
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:782)
      at 
  ...
  Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ic_google_plus_icon.xml from drawable resource ID #0x7f0700ab
      at android.content.res.Resources.loadDrawableForCookie(Resources.java:2872)
  ...
  Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #0: invalid color state list tag gradient
      at android.content.res.ColorStateList.createFromXmlInner(ColorStateList.java:217)
      at 
  ...
  </code></pre>
  
  <p>I checked other posts and most of the time it had something to do with gradle, and I can say that i have <code>vectorDrawables.useSupportLibrary = true</code> set.</p>
  
  <p><strong>Gradle file:</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 27
  
  
      repositories {
          mavenCentral()
      }
      defaultConfig {
          applicationId "com.blub.bla"
          vectorDrawables.useSupportLibrary = true
          minSdkVersion 19
          targetSdkVersion 27
  
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
      android {
          lintOptions {
              disable 'RestrictedApi'
          }
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      implementation 'com.facebook.android:facebook-login:[4,5)'
      implementation 'com.facebook.android:facebook-share:[4,5)'
      implementation 'com.android.support:appcompat-v7:27.0.1'
      implementation 'com.android.support:design:27.0.1'
      implementation 'com.android.support:support-v4:27.0.1'
  
      implementation 'com.squareup.picasso:picasso:2.5.2'
      implementation 'com.squareup.okhttp:okhttp:2.4.0'
      implementation 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
      implementation 'com.google.android.gms:play-services-location:10.+'
      implementation 'com.google.android.gms:play-services-places:10.+'
      implementation 'com.google.maps.android:android-maps-utils:0.4+'
  
      implementation 'eu.the4thfloor.volley:com.android.volley:2015.05.28'
      testImplementation 'junit:junit:4.12'
  }
  </code></pre>
  
  <p><strong>Edit:
  activity_main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      tools:openDrawer="start"&gt;
      &lt;include
          layout="@layout/app_bar_main"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
      &lt;android.support.design.widget.NavigationView
          android:id="@+id/nav_view"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:background="@drawable/bg"
          android:fitsSystemWindows="true"
          app:headerLayout="@layout/nav_header_main"
          app:itemIconTint="@color/white"
          app:itemTextColor="@color/white"
          app:menu="@menu/activity_main_drawer"&gt;
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
              &lt;RelativeLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_alignParentBottom="true"
                  android:paddingBottom="10dp"
                  android:paddingLeft="20dp"
                  android:paddingRight="20dp"
                  &gt;
                  &lt;com.facebook.share.widget.ShareButton
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentBottom="true"
                      android:layout_alignParentLeft="true"
                      android:id="@+id/fb_share_button"/&gt;
                  &lt;ImageButton
                      android:id="@+id/sm_twitter"
                      android:layout_width="30dp"
                      android:layout_height="30dp"
                      android:scaleType="fitXY"
                      app:srcCompat="@drawable/ic_twitter_bird_logo"
                      android:background="@color/transparent"
                      android:layout_alignParentBottom="true"
                      android:layout_alignParentRight="true"
                      /&gt;
                  &lt;ImageButton
                      android:id="@+id/sm_facebook"
                      android:layout_width="30dp"
                      android:layout_height="30dp"
                      android:layout_marginLeft="10dp"
                      android:layout_marginRight="10dp"
                      android:scaleType="fitXY"
                      app:srcCompat="@drawable/ic_f_icon_color"
                      android:background="@color/transparent"
                      android:layout_alignParentBottom="true"
                      android:layout_toLeftOf="@id/sm_twitter"
                      /&gt;
                  &lt;ImageButton
                      android:id="@+id/sm_gplus"
                      android:layout_width="30dp"
                      android:layout_height="30dp"
                      android:scaleType="fitXY"
                      app:srcCompat="@drawable/ic_google_plus_icon"
                      android:background="@color/transparent"
                      android:layout_alignParentBottom="true"
                      android:layout_toLeftOf="@id/sm_facebook"
                      /&gt;
              &lt;/RelativeLayout &gt;
          &lt;/RelativeLayout&gt;
      &lt;/android.support.design.widget.NavigationView&gt;&gt;
      &lt;android.support.design.widget.NavigationView
          android:id="@+id/nav_view_right"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="end"
          android:background="@drawable/bg"
          android:fitsSystemWindows="true"
          app:headerLayout="@layout/nav_header_filter"
          app:itemIconTint="@color/white"
          app:itemTextColor="@color/white"&gt;
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_marginTop="175dp"
              android:orientation="horizontal"&gt;
              &lt;include
                  layout="@layout/filter_layout"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  /&gt;
          &lt;/RelativeLayout&gt;
      &lt;/android.support.design.widget.NavigationView&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>Does anyone know how to fix that? :(</p>