title: Adding ActionBar - need to use a Theme.AppCompat theme
body: <p>I need to add ActionBar.I did steps found from my searches.</p>
  
  <p>1.Added suppoprt library  (appcompat v7 support library)</p>
  
  <p>2.Extended to ActionBarActivity</p>
  
  <p>3.Used AppCompat theme in styles.xml and in manifest</p>
  
  <p>But running the project crashes device with error of "<strong>you need to use a Theme.AppCompat theme</strong>"</p>
  
  <p><strong>styles.xml</strong></p>
  
  <pre><code>&lt;resources&gt;
  
  &lt;style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light"&gt;
  
  &lt;/style&gt;
  
  
  &lt;style name="RatingBar" parent="@android:style/Widget.RatingBar"&gt;
      &lt;item name="android:progressDrawable"&gt;@drawable/ratingbar&lt;/item&gt;
      &lt;item name="android:minHeight"&gt;48dip&lt;/item&gt;
      &lt;item name="android:maxHeight"&gt;48dip&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>Manifest</strong></p>
  
  <pre><code>&lt;application
      android:icon="@drawable/poweritsolar"
      android:label="@string/app_name" 
      &gt;
      &lt;activity
          android:label="@string/app_name"
          android:name=".Powerit_solarActivity" 
          android:theme="@style/AppBaseTheme"&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=".login"&gt;&lt;/activity&gt;
      &lt;activity android:name=".signup"&gt;&lt;/activity&gt;
      &lt;activity android:name=".catagory_btns"&gt;&lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p><strong>activity</strong></p>
  
  <pre><code>public class catagory_btns extends ActionBarActivity{
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.catagory_btns);
      Button cat1=(Button)findViewById(R.id.cat1);
  
  
      cat1.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              Intent in=new Intent(catagory_btns.this,login.class);
              startActivity(in);
          }
      });
  
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // TODO Auto-generated method stub
      getMenuInflater().inflate(R.menu.main, menu);
      ActionBar actionBar = getActionBar();
      actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#00ffff")));
      return super.onCreateOptionsMenu(menu);
  }
  
  }
  </code></pre>
  
  <p><strong>LogCat</strong></p>
  
  <pre><code>01-29 05:02:21.211: E/AndroidRuntime(2305): FATAL EXCEPTION: main
  01-29 05:02:21.211: E/AndroidRuntime(2305): Process: com.power.it.solar, PID: 2305
  01-29 05:02:21.211: E/AndroidRuntime(2305): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.power.it.solar/com.power.it.solar.catagory_btns}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.ActivityThread.access$700(ActivityThread.java:135)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.os.Handler.dispatchMessage(Handler.java:102)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.os.Looper.loop(Looper.java:137)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.ActivityThread.main(ActivityThread.java:4998)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at java.lang.reflect.Method.invokeNative(Native Method)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at java.lang.reflect.Method.invoke(Method.java:515)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at dalvik.system.NativeStart.main(Native Method)
  01-29 05:02:21.211: E/AndroidRuntime(2305): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at com.power.it.solar.catagory_btns.onCreate(catagory_btns.java:20)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.Activity.performCreate(Activity.java:5243)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
  01-29 05:02:21.211: E/AndroidRuntime(2305):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
  </code></pre>