title: Error: You need to use a Theme.AppCompat theme (or descendant) with this activity
body: <p>I am getting this error while executing (on the android monitor console):</p>
  
  <pre><code>06-16 11:25:38.227 1555-1555/com.example.mysampleapp E/AndroidRuntime: FATAL EXCEPTION: main
                                                                           java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mysampleapp/com.example.mysampleapp.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
  </code></pre>
  
  <p>I am trying to integrate zxing in my app using <a href="https://github.com/journeyapps/zxing-android-embedded" rel="nofollow noreferrer">this</a> project, with instructions <a href="https://github.com/journeyapps/zxing-android-embedded/blob/master/README.md" rel="nofollow noreferrer">here</a>. My Manifest is this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.mysampleapp"&gt;
  
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:name="android.support.multidex.MultiDexApplication"
          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;meta-data
                  android:name="com.google.android.geo.API_KEY"
                  android:value="randomkeywhichyoudontneedtoknow" /&gt;
          &lt;/activity&gt;
  
          &lt;activity
              android:name=".SplashActivity"
              android:label="mysampleapp"
              android:configChanges="keyboard|keyboardHidden|orientation|screenSize"&gt;&lt;/activity&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Styles.xml:</p>
  
  <pre><code>&lt;resources&gt;
  
      &lt;!-- Base application theme. --&gt;
      &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
          &lt;!-- Customize your theme here. --&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
      &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>(needed to add some text to the question, so stackoverflow is satisfied and here it is!)</p>