title: setSupportActionBar toolbar cannot be applied to (android.widget.Toolbar) error
body: <p>I've been looking for an answer and I've tried many possible solutions, but nothing seems to work..</p>
  
  <p>I'm trying to setup a Material Action Bar following <a href="http://www.android4devs.com/2014/12/how-to-make-material-design-app.html" rel="noreferrer">this tutorial</a>.</p>
  
  <p>Here's my code:</p>
  
  <p><strong>tool_bar.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/ColorPrimary"
      android:elevation="4dp"&gt;
  
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p><strong>activity.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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:background="#FFFFFF"&gt;
      &lt;!-- The main content view --&gt;
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;include
              android:id="@+id/app_bar"
              layout="@layout/tool_bar" /&gt;
      &lt;/RelativeLayout&gt;
      &lt;!-- Navigation Drawer --&gt;
      &lt;ListView
          android:id="@+id/left_drawer"
          android:layout_width="220dp"
          android:layout_height="match_parent"
          android:layout_gravity="left"
          android:background="#1C1C1C"
          android:divider="@android:color/darker_gray"
          android:dividerHeight="1dp" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>And finally my activity.java:</strong></p>
  
  <pre><code>import android.app.ActionBar;
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.Toolbar;
  
  
  public class rutaActivity extends ActionBarActivity {
  
  private Toolbar toolbar;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_ruta);
  
          getSupportActionBar().hide();//Ocultar ActivityBar anterior
  
          toolbar = (Toolbar) findViewById(R.id.app_bar);
          setSupportActionBar(toolbar); //HERE'S THE PROBLEM !!!!
  </code></pre>
  
  <p><strong>Error:</strong> </p>
  
  <blockquote>
    <p>setSupporActionBar (android.support.v7.widget.Toolbar) in ActionBarActivity cannot be applied to (android.widget.Toolbar)</p>
  </blockquote>
  
  <p>How can I fix this?</p>