title: NullPointerException with android.support.v7.widget.Toolbar
body: <p>I am currently trying to implement a navigation drawer in my app. I am having an issue with the Toolbar being null. I have done many searches online and tried many different solutions to no avail.  I have not finished writing all the code but I can't launch my app to check the navigation drawer. Can anyone see where I went wrong? </p>
  
  <p>If there is anything else I need to post, let me know.</p>
  
  <p>I included this on all my activity screens</p>
  
  <pre><code>&lt;include
      android:id="@+id/app_bar"
      layout="@layout/app_bar"/&gt;
  </code></pre>
  
  <p>app_bar.xml</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"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:minHeight="?attr/actionBarSize"
     android:background="?attr/colorPrimary"
     app:popupTheme="@style/ThemeOverlay.AppCompat.Dark" &gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>line 72 of MainActivity</p>
  
  <pre><code>setSupportActionBar(mToolbar);
  </code></pre>
  
  <p>Main Activity</p>
  
  <pre><code>public class Trans_List extends ActionBarActivity {
    private Toolbar mToolbar;
    private CharSequence mTitle;
  
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_trans_list);
  
          mToolbar = (Toolbar) findViewById(R.id.app_bar);
  
          setSupportActionBar(mToolbar);
          getSupportActionBar().setDisplayShowHomeEnabled(true);
          NavigationDrawerFragment drawerFragment = (NavigationDrawerFragment)
                  getSupportFragmentManager().findFragmentById(R.id.left_drawer);
          drawerFragment.setUp((DrawerLayout) findViewById(R.id.drawer_layout), mToolbar);
  </code></pre>
  
  <p>Style.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar" &gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="Theme.split" parent="AppBaseTheme"&gt;
  
      &lt;/style&gt;
  
      &lt;style name="dialog_custom" parent="@style/Theme.AppCompat.Dialog"&gt;
          &lt;item name="@android:listPreferredItemPaddingLeft"&gt;20dip&lt;/item&gt;
          &lt;item name="@android:listPreferredItemPaddingRight"&gt;20dip&lt;/item&gt;
          &lt;item name="@android:listPreferredItemPaddingStart"&gt;20dip&lt;/item&gt;
          &lt;item name="@android:listPreferredItemPaddingEnd"&gt;20dip&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>LogCat</p>
  
  <pre><code>01-07 01:14:29.702    4811-4811/com.lee.yuchan.splt E/AndroidRuntime﹕
  FATAL EXCEPTION: main
          Process: com.lee.yuchan.splt, PID: 4811
          java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lee.yuchan.splt/com.lee.yuchan.splt.Trans_List}:
  java.lang.NullPointerException: Attempt to invoke virtual method
  'java.lang.CharSequence android.support.v7.widget.Toolbar.getTitle()'
  on a null object reference
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
                  at android.app.ActivityThread.access$800(ActivityThread.java:144)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:135)
                  at android.app.ActivityThread.main(ActivityThread.java:5221)
                  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:899)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
           Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence
  android.support.v7.widget.Toolbar.getTitle()' on a null object
  reference
                  at android.support.v7.internal.widget.ToolbarWidgetWrapper.&lt;init&gt;(ToolbarWidgetWrapper.java:95)
                  at android.support.v7.internal.widget.ToolbarWidgetWrapper.&lt;init&gt;(ToolbarWidgetWrapper.java:88)
                  at android.support.v7.internal.app.ToolbarActionBar.&lt;init&gt;(ToolbarActionBar.java:84)
                  at android.support.v7.app.ActionBarActivityDelegateBase.setSupportActionBar(ActionBarActivityDelegateBase.java:175)
                  at android.support.v7.app.ActionBarActivity.setSupportActionBar(ActionBarActivity.java:92)
                  at com.lee.yuchan.splt.Trans_List.onCreate(Trans_List.java:72)
                  at android.app.Activity.performCreate(Activity.java:5933)
                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
                  at android.app.ActivityThread.access$800(ActivityThread.java:144)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:135)
                  at android.app.ActivityThread.main(ActivityThread.java:5221)
                  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:899)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  </code></pre>
  
  <p>Main Activity XML</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"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:id="@+id/drawer_layout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
          &lt;!-- The main content view --&gt;
      &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
          &lt;include
              layout="@layout/app_bar"/&gt;
  
          &lt;TextView
              android:id="@+id/selectItems"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="@string/select_instr1"
              android:textSize="20sp"
              android:gravity="center"
              android:paddingTop="4sp"
              android:paddingBottom="10sp" &gt;
          &lt;/TextView&gt;
  
          &lt;ListView
              android:id="@+id/listView1"
              android:layout_width="match_parent"
              android:layout_height="0dip"
              android:layout_weight="1" &gt;
          &lt;/ListView&gt;
  
          &lt;Button
              android:id="@+id/buttonChecked"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_margin="0dip"
              android:background="@drawable/custom_button"
              android:textColor="#ffffff"
              android:text="@string/next_button" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;!-- The navigation drawer --&gt;
      &lt;fragment
          android:id="@+id/left_drawer"
          android:layout_width="@dimen/nav_dr"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          app:layout="@layout/fragment_navigation_drawer"
          android:name="com.lee.yuchan.splt.NavigationDrawerFragment"
          tools:layout="@layout/fragment_navigation_drawer" /&gt;
  
      &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>