title: You need to use a Theme.AppCompat theme (or descendant) with this activity. Change to Theme.AppCompat causes other error
body: <p>I use appcompat v22.1.0 in my App and use Toolbar. Everything was fine when I use <code>Theme.AppCompat.Light.NoActionBar</code>. When I start implement <code>AlertDialog</code>, it produce error like this:</p>
  
  <pre><code>java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
          at android.support.v7.app.AppCompatDelegateImplBase.onCreate(AppCompatDelegateImplBase.java:113)
          at android.support.v7.app.AppCompatDelegateImplV7.onCreate(AppCompatDelegateImplV7.java:146)
          at android.support.v7.app.AppCompatDialog.&lt;init&gt;(AppCompatDialog.java:47)
          at android.support.v7.app.AlertDialog.&lt;init&gt;(AlertDialog.java:92)
          at android.support.v7.app.AlertDialog$Builder.create(AlertDialog.java:882)
          at com.ramabmtr.map.findingmoo.MainActivity.onOptionsItemSelected(MainActivity.java:216)
          at android.app.Activity.onMenuItemSelected(Activity.java:2572)
          at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:353)
          at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:144)
          at android.support.v7.internal.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:99)
          at android.support.v7.internal.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:99)
          at android.support.v7.internal.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:74)
          at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:164)
          at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:740)
          at android.support.v7.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:802)
          at android.support.v7.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:153)
          at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:949)
          at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:939)
          at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:598)
          at android.support.v7.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:139)
          at android.view.View.performClick(View.java:4084)
          at android.view.View$PerformClick.run(View.java:16989)
          at android.os.Handler.handleCallback(Handler.java:615)
          at android.os.Handler.dispatchMessage(Handler.java:92)
          at android.os.Looper.loop(Looper.java:137)
          at android.app.ActivityThread.main(ActivityThread.java:4812)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:511)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559)
          at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Based on that error, I change my theme to <code>Theme.AppCompat</code> and put this:</p>
  
  <pre><code>&lt;item name="windowActionBar"&gt;false&lt;/item&gt;
  &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
  </code></pre>
  
  <p>to my theme. But it produce the same error.</p>
  
  <p><strong>Style.xml (old)</strong></p>
  
  <pre><code>&lt;resources&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
  &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>Style.xml (new)</strong></p>
  
  <pre><code>&lt;resources&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat"&gt;
      &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
  &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Anyone knows how to fix it??</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>package com.ramabmtr.map.findingmoo;
  
  import android.content.DialogInterface;
  import android.graphics.Typeface;
  import android.os.Bundle;
  import android.support.v4.widget.DrawerLayout;
  import android.support.v7.app.ActionBarDrawerToggle;
  import android.support.v7.app.AlertDialog;
  import android.support.v7.app.AppCompatActivity;
  import android.support.v7.widget.RecyclerView;
  import android.support.v7.widget.Toolbar;
  import android.view.View;
  import android.widget.TextView;
  import android.widget.Toast;
  
  public class MainActivity extends AppCompatActivity {
  
  private Toolbar toolbar;
  private TextView toolbarTitle;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
      getSupportActionBar().setDisplayShowTitleEnabled(false);
  
      Typeface myTypeface = Typeface.createFromAsset(getAssets(), "fonts/panpizza.ttf");
      toolbarTitle = (TextView) findViewById(R.id.toolbar_title);
      toolbarTitle.setTypeface(myTypeface);
  
      AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());
      builder.setTitle(R.string.filter_title);
      builder.setMessage("test");
      builder.setPositiveButton(R.string.ok_button, new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dialog, int id) {
              dialog.dismiss();
          }
      });
      builder.setNegativeButton(R.string.cancel_button, new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dialog, int id) {
              dialog.dismiss();
          }
      });
      AlertDialog dialog = builder.create();
      dialog.show();
  }
  }
  </code></pre>