title: android.view.InflateException: Binary XML file line #12: Error inflating class android.support.v7.widget.Toolbar
body: <p>I have a working on app on a device with API 22, But when I tried to install the same app on device with API 19 (Xiomi device) I get below error;</p>
  
  <pre><code>android.view.InflateException: Binary XML file line #12: Error inflating class android.support.v7.widget.Toolbar
  </code></pre>
  
  <p>Here is the activity_login.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      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:layout_width="match_parent"
      android:layout_height="match_parent" android:fitsSystemWindows="true"
      tools:context=".LoginActivity"&gt;
  
      &lt;android.support.design.widget.AppBarLayout android:layout_height="wrap_content"
          android:layout_width="match_parent" android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
          &lt;android.support.v7.widget.Toolbar android:id="@+id/toolbar"
              android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
              android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;include layout="@layout/content_login" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>Here is content_login.xml</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent"
      android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"
      tools:showIn="@layout/activity_login" tools:context=".LoginActivity"&gt;
  
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:inputType="textPersonName"
              android:hint="username"
              android:ems="10"
              android:id="@+id/etUsername"
              android:layout_alignParentStart="true" /&gt;
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:inputType="textPassword"
              android:hint="password"
              android:ems="10"
              android:id="@+id/etPassword"
              android:layout_below="@+id/etUsername" /&gt;
  
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:hint="Mobile Number"
              android:ems="10"
              android:id="@+id/etMobile"
              android:layout_below="@+id/etPassword" /&gt;
  
  
          &lt;Button
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="Login"
              android:id="@+id/bLogin"
              android:layout_marginTop="40dp"
              android:layout_below="@+id/etPassword"
              android:layout_alignParentStart="true"
              android:layout_alignEnd="@+id/etPassword" /&gt;
  
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is build.gradle file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.0"
  
      defaultConfig {
          applicationId "com.test.myschool"
          minSdkVersion 17
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.2.0'
      compile 'com.android.support:design:23.2.0'
      compile 'com.google.android.gms:play-services:8.4.0'
      compile 'com.squareup.picasso:picasso:2.5.2'
  
  }
  </code></pre>
  
  <p>Here is the error Log:</p>
  
  <pre><code>03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime: FATAL EXCEPTION: main
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime: Process: com.test.myschool, PID: 5253
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.myschool/com.test.myschool.LoginActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class android.support.v7.widget.Toolbar
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2382)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2434)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:154)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:110)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:193)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5349)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:835)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:651)
  03-14 18:55:06.162 5253-5253/com.test.myschool E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)
  </code></pre>