title: Error inflating navigation view from support library
body: <p>I was just trying out the new support library navigation drawer. I read a tutorial and implemented the code as they said.</p>
  
  <p>I'm getting this error: </p>
  
  <pre><code>Process: myapp.application, PID: 29645
      java.lang.RuntimeException: Unable to start activity ComponentInfo{myapp.application/myapp.application.MainActivity}: android.view.InflateException: Binary XML file line #20: Error inflating class android.support.design.widget.NavigationView
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2341)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
              at android.app.ActivityThread.access$800(ActivityThread.java:154)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5274)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
       Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class android.support.design.widget.NavigationView
              at android.view.LayoutInflater.createView(LayoutInflater.java:633)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
              at myapp.application.MainActivity.onCreate(MainActivity.java:16)
              at android.app.Activity.performCreate(Activity.java:5995)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2294)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
              at android.app.ActivityThread.access$800(ActivityThread.java:154)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5274)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
       Caused by: java.lang.reflect.InvocationTargetException
              at java.lang.reflect.Constructor.newInstance(Native Method)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
              at android.view.LayoutInflater.createView(LayoutInflater.java:607)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
              at myapp.application.MainActivity.onCreate(MainActivity.java:16)
              at android.app.Activity.performCreate(Activity.java:5995)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2294)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
              at android.app.ActivityThread.access$800(ActivityThread.java:154)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5274)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
       Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class TextView
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
              at android.support.design.internal.NavigationMenuPresenter.inflateHeaderView(NavigationMenuPresenter.java:184)
              at android.support.design.widget.NavigationView.inflateHeaderView(NavigationView.java:227)
              at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:152)
              at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:88)
              at java.lang.reflect.Constructor.newInstance(Native Method)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
              at android.view.LayoutInflater.createView(LayoutInflater.java:607)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
              at myapp.application.MainActivity.onCreate(MainActivity.java:16)
              at android.app.Activity.performCreate(Activity.java:5995)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2294)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
              at android.app.ActivityThread.access$800(ActivityThread.java:154)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5274)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
       Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 24
              at android.content.res.TypedArray.getColor(TypedArray.java:401)
              at android.widget.TextView.&lt;init&gt;(TextView.java:696)
              at android.widget.TextView.&lt;init&gt;(TextView.java:632)
              at android.support.v7.widget.AppCompatTextView.&lt;init&gt;(AppCompatTextView.java:44)
              at android.support.v7.widget.AppCompatTextView.&lt;init&gt;(AppCompatTextView.java:40)
              at android.support.v7.internal.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
              at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:802)
              at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:832)
              at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:725)
              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
              at android.support.design.internal.NavigationMenuPresenter.inflateHeaderView(NavigationMenuPresenter.java:184)
              at android.support.design.widget.NavigationView.inflateHeaderView(NavigationView.java:227)
              at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:152)
              at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:88)
              at java.lang.reflect.Constructor.newInstance(Native Method)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
              at android.view.LayoutInflater.createView(LayoutInflater.java:607)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java
  </code></pre>
  
  <p>My xml file:</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/drawer"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:theme="@style/AppTheme.TranslucentWindow"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
  
          &lt;FrameLayout
              android:id="@+id/container"
              android:layout_width="match_parent"
              android:layout_height="match_parent" /&gt;
      &lt;/LinearLayout&gt;
  
  
      &lt;android.support.design.widget.NavigationView
          android:id="@+id/navigation_view"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          app:headerLayout="@layout/drawer_header"
          app:itemTextColor="@android:color/black"
          app:menu="@menu/drawer_menu" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>I dont know what actually is going wrong. I tried a few things and checked my header and menu xml, they have no problem.</p>