title: Android app crashes on startActivity
body: <p>I downloaded a database from the internet and i'm trying to build my app on top of it. It's tested and it works. The problems begin when I try to open a new activity</p>
  
  <p>I have a button called "New" on my main layout which is supposed to open a new window in my app (just open a new activity for now), but it crashes immediately on call. My current activity is <code>DatabaseExampleActivity</code>(my main) and I want the new one to be <code>NewAssignmentActivity</code>.</p>
  
  <p>Here are the relevant code sections:</p>
  
  <p>//the function that is called when "new" button is pressed</p>
  
  <pre><code>public void newAssignment(View view) {
      Intent i = new Intent(DatabaseExampleActivity.this, NewAssignmentActivity.class);
      startActivity(i);
      }
  </code></pre>
  
  <p>//The manifest</p>
  
  <pre><code>&lt;activity
  android:name=".DatabaseExampleActivity"
  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=".NewAssignmentActivity"
          android:label="@string/title_activity_new_assignment" &gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p></p>
  
  <p>//the new activity code</p>
  
  <pre><code>import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  
  public class NewAssignmentActivity extends ActionBarActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_newassignment);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.new_assignment, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
      if (id == R.id.action_settings) {
          return true;
      }
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>consol writes in red : ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.anotherandroidblog.tools.database/.DatabaseExampleActivity }
  ActivityManager: Warning: Activity not started, its current task has been brought to the front
  </code></pre>
  
  <p>The logCat also gives tons of errors too:</p>
  
  <pre><code>07-28 18:29:39.792: E/ERROR(5847): java.lang.NullPointerException
  07-28 18:29:39.792: W/System.err(5847): java.lang.NullPointerException
  07-28 18:29:39.792: W/System.err(5847):     at com.anotherandroidblog.tools.database.DatabaseExampleActivity.addButtonListeners(DatabaseExampleActivity.java:104)
  07-28 18:29:39.792: W/System.err(5847):     at com.anotherandroidblog.tools.database.DatabaseExampleActivity.onCreate(DatabaseExampleActivity.java:51)
  07-28 18:29:39.792: W/System.err(5847):     at android.app.Activity.performCreate(Activity.java:5206)
  07-28 18:29:39.792: W/System.err(5847):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
  07-28 18:29:39.792: W/System.err(5847):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
  07-28 18:29:39.792: W/System.err(5847):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
  07-28 18:29:39.792: W/System.err(5847):     at android.app.ActivityThread.access$700(ActivityThread.java:140)
  07-28 18:29:39.792: W/System.err(5847):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
  07-28 18:29:39.792: W/System.err(5847):     at android.os.Handler.dispatchMessage(Handler.java:99)
  07-28 18:29:39.792: W/System.err(5847):     at android.os.Looper.loop(Looper.java:137)
  07-28 18:29:39.792: W/System.err(5847):     at android.app.ActivityThread.main(ActivityThread.java:4921)
  07-28 18:29:39.792: W/System.err(5847):     at java.lang.reflect.Method.invokeNative(Native Method)
  07-28 18:29:39.792: W/System.err(5847):     at java.lang.reflect.Method.invoke(Method.java:511)
  07-28 18:29:39.792: W/System.err(5847):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
  07-28 18:29:39.792: W/System.err(5847):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
  07-28 18:29:39.792: W/System.err(5847):     at dalvik.system.NativeStart.main(Native Method)
  07-28 18:29:59.301: I/brcm-gr(5847): [gralloc_lock]: new usage 0x933
  07-28 18:29:59.301: D/AndroidRuntime(5847): Shutting down VM
  07-28 18:29:59.301: W/dalvikvm(5847): threadid=1: thread exiting with uncaught exception (group=0x41bcf2a0)
  07-28 18:29:59.311: E/AndroidRuntime(5847): FATAL EXCEPTION: main
  07-28 18:29:59.311: E/AndroidRuntime(5847): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.anotherandroidblog.tools.database/com.anotherandroidblog.tools.database.NewAssignmentActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.ActivityThread.access$700(ActivityThread.java:140)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.os.Handler.dispatchMessage(Handler.java:99)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.os.Looper.loop(Looper.java:137)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.ActivityThread.main(ActivityThread.java:4921)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at java.lang.reflect.Method.invokeNative(Native Method)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at java.lang.reflect.Method.invoke(Method.java:511)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at dalvik.system.NativeStart.main(Native Method)
  07-28 18:29:59.311: E/AndroidRuntime(5847): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:110)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:99)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at com.anotherandroidblog.tools.database.NewAssignmentActivity.onCreate(NewAssignmentActivity.java:12)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.Activity.performCreate(Activity.java:5206)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
  07-28 18:29:59.311: E/AndroidRuntime(5847):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
  </code></pre>