title: Android java.lang.NullPointerException getActionBar()
body: <p>I tried to implement an Setting Activity class but it give's me back an error: </p>
  
  <pre><code>Caused by: java.lang.NullPointerException
              at com.example.andrei.sunshine.SettingsActivity.setupActionBar(SettingsActivity.java:58)
              at com.example.andrei.sunshine.SettingsActivity.onCreate(SettingsActivity.java:48)
              at android.app.Activity.performCreate(Activity.java:5264)
  </code></pre>
  
  <p>This is the line :  <code>getActionBar().setDisplayHomeAsUpEnabled(true);</code> </p>
  
  <p>And the AndroidManifest is :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name=".MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity
          android:name=".DetailActivity"
          android:label="@string/title_activity_detail"
          android:parentActivityName=".MainActivity" &gt;
          &lt;meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value="com.example.andrei.sunshine.MainActivity" /&gt;
      &lt;/activity&gt;
      &lt;activity
          android:name=".SettingsActivity"
          android:label="@string/title_activity_settings"
          android:parentActivityName=".MainActivity" &gt;
          &lt;meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value="com.example.andrei.sunshine.MainActivity" /&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>Please help me </p>