title: android.view.InflateException: Binary XML file line #7: Error inflating class Toolbar
body: <p>I am trying to use <code>ToolBar</code> (Lollipop Widget) using <code>android.support.v7</code> library.  </p>
  
  <p>But while running an app getting an error.  </p>
  
  <pre><code>android.view.InflateException: Binary XML file line #7: Error inflating class Toolbar    
  </code></pre>
  
  <p>My main goal is to have a <code>navigation drawer</code> using <code>toolbar</code>.</p>
  
  <p>This is the Layout file which i am using :  </p>
  
  <pre><code>   &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@+id/frame_container1"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
  
  
  &lt;Toolbar android:id="@+id/toolbar"            &lt;------ line #7
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/status" &gt;&lt;/Toolbar&gt;
  
  &lt;android.support.v4.widget.DrawerLayout 
      android:id="@+id/drawer_layout"
      android:layout_below="@+id/toolbar"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#FFFFFF" &gt;
  
      &lt;!-- Framelayout to display Fragments --&gt;
      &lt;RelativeLayout
          android:id="@+id/frame_container"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
      &lt;/RelativeLayout&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:choiceMode="singleChoice"
          android:dividerHeight=".02dp"        
          android:background="#000000"/&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  
          &lt;/RelativeLayout&gt;  
  </code></pre>
  
  <p>I am using following code :  </p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
          adapter = new ArrayAdapter&lt;String&gt;(getApplicationContext(), android.R.layout.simple_list_item_1, new String[]{""});
          //mDrawerList.setAdapter(adapter);
           t=(Toolbar) findViewById(R.id.toolbar);
  
          //getActionBar().setDisplayHomeAsUpEnabled(true);
          //getActionBar().setHomeButtonEnabled(true);
  
  
          mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
                  R.string.app_name, // nav drawer open - description for accessibility
                  R.string.app_name // nav drawer close - description for accessibility
          ) {
              public void onDrawerClosed(View view) {
  
                  // calling onPrepareOptionsMenu() to show action bar icons
                  //  invalidateOptionsMenu();
              super.onDrawerClosed(view);
              }
  
              public void onDrawerOpened(View drawerView) {
  
  
                  super.onDrawerClosed(drawerView);
              }
          };
          mDrawerLayout.setDrawerListener(mDrawerToggle);
      }
  </code></pre>
  
  <p>Please help.</p>