title: Android: Issue with InflateException (Error inflating class android.support.v7.widget.Toolbar)
body: <p>I am having an issue receiving an RuntimeException and InflateException stating Binary XML file: Error inflating class android.support.v7.widget.Toolbar. I created a project which attempts to use a navigation drawer. I created an android-support-v7-appcompat library (following the directions through google docs) using Android 5.0. In the app, I am extending a NavigationDrawerActivity. I am not sure what is causing this. The libraries seem to be set up correctly, but the app crashes upon launch.</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>public class MainActivity extends NavigationDrawerActivity {
  
      private static final String LOGTAG = "MainActivity";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) 
      {
          // Layout
          setContentView(R.layout.activity_main);
  
          super.onCreate(savedInstanceState);
  </code></pre>
  
  <p><strong>NavigationDrawerActivity.java</strong></p>
  
  <pre><code>public class NavigationDrawerActivity extends ActionBarActivity 
  {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          // Use ToolBar and set it as ActionBar
          Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
          setSupportActionBar(toolbar);
  </code></pre>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"     xmlns:app="http://schemas.android.com/apk/res/com.mobile_iab_ad_framework"&gt;
  
  &lt;!--     Added fitSystemWindows to allow NavDrawer overlay ActionBar --&gt;
  
  &lt;!--     To display fragments --&gt;
      &lt;FrameLayout
          android:id="@+id/frame_container"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
  
  &lt;!--         Use a Toolbar so the drawer can be displayed over ActionBar --&gt;
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/my_awesome_toolbar"
              style="@style/HeaderBar"
              app:theme="@style/ActionBarThemeOverlay"
              app:popupTheme="@style/ActionBarPopupThemeOverlay"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
      &lt;/FrameLayout&gt;
  
  &lt;!--        Listview to display slider menu --&gt;
          &lt;ListView
              android:id="@+id/list_slidermenu"
              android:layout_width="240dp"
              android:layout_height="match_parent" 
              android:layout_gravity="start"
              android:background="@color/list_background"
              android:choiceMode="singleChoice"
              android:divider="@color/list_divider"
              android:dividerHeight="0dp"
              android:listSelector="@drawable/list_selector" /&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>LogCat Log</strong></p>
  
  <pre><code>12-06 03:06:56.487: E/AndroidRuntime(7105): FATAL EXCEPTION: main
  12-06 03:06:56.487: E/AndroidRuntime(7105): Process: com.package, PID: 7105
  12-06 03:06:56.487: E/AndroidRuntime(7105): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mobile_iab_ad_framework/com.package.device_discovery.MainActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.widget.Toolbar
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.ActivityThread.access$900(ActivityThread.java:161)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.os.Handler.dispatchMessage(Handler.java:102)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.os.Looper.loop(Looper.java:157)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.ActivityThread.main(ActivityThread.java:5356)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at java.lang.reflect.Method.invokeNative(Native Method)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at java.lang.reflect.Method.invoke(Method.java:515)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at dalvik.system.NativeStart.main(Native Method)
  12-06 03:06:56.487: E/AndroidRuntime(7105): Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.widget.Toolbar
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.createView(LayoutInflater.java:626)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at com.package.device_discovery.MainActivity.onCreate(MainActivity.java:51)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.Activity.performCreate(Activity.java:5431)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     ... 11 more
  12-06 03:06:56.487: E/AndroidRuntime(7105): Caused by: java.lang.reflect.InvocationTargetException
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at java.lang.reflect.Constructor.constructNative(Native Method)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.view.LayoutInflater.createView(LayoutInflater.java:600)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     ... 23 more
  12-06 03:06:56.487: E/AndroidRuntime(7105): Caused by: java.lang.NoSuchMethodError: android.support.v4.content.ContextCompat.getDrawable
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:133)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.support.v7.widget.Toolbar.&lt;init&gt;(Toolbar.java:249)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     at android.support.v7.widget.Toolbar.&lt;init&gt;(Toolbar.java:191)
  12-06 03:06:56.487: E/AndroidRuntime(7105):     ... 26 more
  </code></pre>
  
  <p><strong>styles.xml</strong></p>
  
  <pre><code>&lt;resources xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;!--
          Base application theme, dependent on API level. This theme is replaced
          by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
      --&gt;
      &lt;style name="AppBaseTheme" parent="android:Theme.Light"&gt;
          &lt;!--
              Theme customizations available in newer API levels can go in
              res/values-vXX/styles.xml, while customizations related to
              backward-compatibility can go here.
          --&gt;
          &lt;item name="android:actionBarStyle"&gt;@style/MyActionBar&lt;/item&gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;!-- Application theme. --&gt;
      &lt;style name="AppTheme" parent="AppBaseTheme"&gt;
          &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;
          &lt;item name="android:actionBarStyle"&gt;@style/MyActionBar&lt;/item&gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;!--  Extends Theme.Holo.Light and removes the Action Bar --&gt;
      &lt;style name="ThemeWithoutActionBar" parent="android:Theme.Holo.Light"&gt;
          &lt;item name="android:windowActionBar"&gt;false&lt;/item&gt;
          &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;!-- ************************************************************** --&gt;
      &lt;!-- Action Bar Style (Requires API 11) --&gt;
      &lt;style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar"&gt;
          &lt;item name="android:background"&gt;@color/action_bar_bg&lt;/item&gt;
          &lt;item name="android:height"&gt;60dp&lt;/item&gt;
          &lt;item name="android:titleTextStyle"&gt;@style/MyActionBar.TitleTextStyle&lt;/item&gt;
      &lt;/style&gt;
      &lt;!-- ************************************************************** --&gt;
  
      &lt;!-- ************************************************************** --&gt;
      &lt;!-- Action Bar Text Style (Requires API 13) --&gt;
      &lt;style name="MyActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"&gt;
          &lt;item name="android:textColor"&gt;#FFFFFF&lt;/item&gt;
          &lt;item name="android:textSize"&gt;20sp&lt;/item&gt;
      &lt;/style&gt;
      &lt;!-- ************************************************************** --&gt;
  
  
  
      &lt;!-- ************************************************************** --&gt;
      &lt;!-- Toolbar Style --&gt;
      &lt;style name="toolbarStyle" parent="Theme.AppCompat"&gt;
  
      &lt;/style&gt;
  
      &lt;style name="ActionBarThemeOverlay" parent=""&gt;
          &lt;!-- Color of Toolbar Font Color --&gt;
          &lt;item name="android:textColorPrimary"&gt;@android:color/white&lt;/item&gt;
  
          &lt;!-- Color of Toolbar Action Buttons --&gt;
          &lt;item name="colorControlNormal"&gt;@android:color/black&lt;/item&gt;
          &lt;item name="colorControlHighlight"&gt;@android:color/black&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="HeaderBar"&gt;
          &lt;!-- Color of Toolbar Background Color --&gt;
          &lt;item name="android:background"&gt;@color/action_bar_bg&lt;/item&gt;
          &lt;item name="android:minHeight"&gt;80dp&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="ActionBarPopupThemeOverlay" parent="ThemeOverlay.AppCompat.Light" &gt;
          &lt;!-- Color of Toolbar Popup from Action Overflow --&gt;
          &lt;!-- 
          &lt;item name="android:background"&gt;@android:color/holo_green_light&lt;/item&gt;
          &lt;item name="android:textColor"&gt;@android:color/holo_green_dark&lt;/item&gt;
          --&gt;
      &lt;/style&gt;
      &lt;!-- ************************************************************** --&gt;
  
  &lt;/resources&gt;
  </code></pre>