title: Android app crashes after startActivity method is called from Onclick callback, manifest seems ok
body: <p>I am writing my first Android app and I am stuck with this problem:  </p>
  
  <p>I'd like to switch from <em>MainActivity</em> to <em>AddExpense</em> activity after a <strong>FloatingButton</strong> is clicked so I wrote this code (inside <code>protected void onCreate(Bundle savedInstanceState)</code>:  </p>
  
  <pre><code>    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
      fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent intent = new Intent(getApplicationContext(), AddExpense.class);
              startActivity(intent);
          }
      });
  </code></pre>
  
  <p><em>AddExpense</em> class looks easily like this</p>
  
  <pre><code>public class AddExpense extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_add_expense);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>However the application keeps crashing after i click on the fab.<br>
  Looking through other answers i found that usually the problem lies inside the manifest, but i think this is not my case:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;application&gt;
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
      &lt;activity
          android:name=".MainActivity"
          android:label="@string/app_name"
          android:theme="@style/AppTheme.NoActionBar"&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=".AddExpense"
          android:label="@string/app_name"&gt;&lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>Any help would be extremely appreciated.</p>
  
  <p>--EDIT--
  logcat report:  </p>
  
  <pre><code>08-19 18:10:02.802 10393-10393/com.example.senso.budgetracker E/AndroidRuntime: FATAL EXCEPTION: main
                                                                              Process: com.example.senso.budgetracker, PID: 10393
                                                                              java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.senso.budgetracker/com.example.senso.budgetracker.AddExpense}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                                                                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2728)
                                                                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2814)
                                                                                  at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
                                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                  at android.os.Looper.loop(Looper.java:154)
                                                                                  at android.app.ActivityThread.main(ActivityThread.java:6290)
                                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
                                                                               Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                                                                                  at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:356)
                                                                                  at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:325)
                                                                                  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:286)
                                                                                  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                                                                                  at com.example.senso.budgetracker.AddExpense.onCreate(AddExpense.java:11)
                                                                                  at android.app.Activity.performCreate(Activity.java:6760)
                                                                                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134)
                                                                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2681)
                                                                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2814) 
                                                                                  at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527) 
                                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                  at android.os.Looper.loop(Looper.java:154) 
                                                                                  at android.app.ActivityThread.main(ActivityThread.java:6290) 
                                                                                  at java.lang.reflect.Method.invoke(Native Method) 
  </code></pre>