title: InflateException : Error inflating class android.support.design.widget.NavigationView
body: <p>I am able to test my android app on my mobile 5.0 perfectly fine, but testing it on Xiaomi, Asus phones( modified android os phones) throws an exception.</p>
  
  <pre><code>Error inflating class android.support.design.widget.NavigationView
  </code></pre>
  
  <p>I tried every solution given to this question on stackoverflow, but the error message still exists.</p>
  
  <p><strong>actvity_main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer_layout"
    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:openDrawer="start"&gt;
  
    &lt;include
      layout="@layout/app_bar_main"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"/&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:fitsSystemWindows="true"
      app:headerLayout="@layout/nav_header_main"
      app:itemTextColor="?android:textColorPrimary"
      app:menu="@menu/activity_main_drawer"/&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
  
    defaultConfig {
      applicationId "com.image"
      minSdkVersion 15
      targetSdkVersion 21
      versionCode 10
      versionName "5.11.10"
  }
  buildTypes {
      release {
          shrinkResources true
          minifyEnabled true
          proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
     compile fileTree(dir: 'libs', include: ['*.jar'])
     testCompile 'junit:junit:4.12'
     compile 'com.android.support:appcompat-v7:23.2.1'
     compile 'com.android.support:design:23.2.1'
     compile 'com.google.android.gms:play-services-ads:8.4.0'
     compile 'com.android.support:support-v4:23.2.1'
     compile 'com.google.android.gms:play-services-analytics:8.4.0'
     compile 'com.android.support:recyclerview-v7:23.4.0'
  }
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p><strong>logs</strong></p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.image/com.image.MainActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.design.widget.NavigationView
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2200)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249)
  at android.app.ActivityThread.access$800(ActivityThread.java:141)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:5052)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
  at dalvik.system.NativeStart.main(Native Method)
  
  Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.design.widget.NavigationView
  at android.view.LayoutInflater.createView(LayoutInflater.java:623)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
  at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
  at com.image.MainActivity.onCreate(MainActivity.java:46)
  at android.app.Activity.performCreate(Activity.java:5245)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249                                                                            at android.app.ActivityThread.access$800(ActivityThread.java:141)                                                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)                                                                               at android.os.Handler.dispatchMessage(Handler.java:102)                                                                               at android.os.Looper.loop(Looper.java:136)                                                                               at android.app.ActivityThread.main(ActivityThread.java:5052)                                                                              at java.lang.reflect.Method.invokeNative(Native Method)                                                                              at java.lang.reflect.Method.invoke(Method.java:515)                                                                         
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 
  at dalvik.system.NativeStart.main(Native Method) 
  
  Caused by: java.lang.reflect.InvocationTargetException
  at java.lang.reflect.Constructor.constructNative(Native Method)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at android.view.LayoutInflater.createView(LayoutInflater.java:597)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699) 
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 
  at android.view.LayoutInflater.inflate(LayoutInflater.java:495) 
  at android.view.LayoutInflater.inflate(LayoutInflater.java:400) 
  at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
  at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) 
  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
  at com.image.MainActivity.onCreate(MainActivity.java:46) 
  at android.app.Activity.performCreate(Activity.java:5245)                                                                                      
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)                                                                                
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164) 
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249                                                                                 
  at android.app.ActivityThread.access$800(ActivityThread.java:141)                                                                                
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)                                                                                
  at android.os.Handler.dispatchMessage(Handler.java:102)                                                                              
  at android.os.Looper.loop(Looper.java:136)                                                                              
  at android.app.ActivityThread.main(ActivityThread.java:5052)                                                                                
  at java.lang.reflect.Method.invokeNative(Native Method)                                                                                
  at java.lang.reflect.Method.invoke(Method.java:515)                                                                              
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)                                                                               
  at dalvik.system.NativeStart.main(Native Method)      
  
  Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020050                                                                                
  at android.content.res.Resources.getValue(Resources.java:1133)                                                                               
  at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:285)                                                                             
  at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)                                                                             
  at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)                                                                              
  at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:421)                                                                            
  at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.prepareMenuItems(NavigationMenuPresenter.java:475)                                                                             
  at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.update(NavigationMenuPresenter.java:436)                                                                             
  at android.support.design.internal.NavigationMenuPresenter.updateMenuView(NavigationMenuPresenter.java:112)
  at android.support.design.widget.NavigationView.inflateMenu(NavigationView.java:241)
  at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:169)                                                                              
  at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:95)                                                                               
  at java.lang.reflect.Constructor.constructNative(Native Method)                                                                            
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)                                                                            
  at android.view.LayoutInflater.createView(LayoutInflater.java:597)                                                                            
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)                                                                            
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)                                                                            
  at android.view.LayoutInflater.inflate(LayoutInflater.java:495)                                                                            
  at android.view.LayoutInflater.inflate(LayoutInflater.java:400)                                                                       
  at android.view.LayoutInflater.inflate(LayoutInflater.java:353)                                                                               
  at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)                                                                             
  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)                                                                           
  at com.image.MainActivity.onCreate(MainActivity.java:46)                                                                              
  at android.app.Activity.performCreate(Activity.java:5245)                                                                              
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)                                                                           
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164)                                                                              
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249                                                                            
  at android.app.ActivityThread.access$800(ActivityThread.java:141)                                                                                 
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)                                                                               
  at android.os.Handler.dispatchMessage(Handler.java:102)                                                                               
  at android.os.Looper.loop(Looper.java:136)                                                                            
  at android.app.ActivityThread.main(ActivityThread.java:5052)                                                                             
  at java.lang.reflect.Method.invokeNative(Native Method)                                                                              
  at java.lang.reflect.Method.invoke(Method.java:515)                                                                             
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)                                                                           
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)                                                                              
  at dalvik.system.NativeStart.main(Native Method) 
  </code></pre>
  
  <p>i tried all the possible solutions, still i am facing issue only in Xiaomi, Asus phones only.</p>