Can't Find Theme.AppCompat.Light for New Android ActionBar Support

You need to do next:

  1. File->Import (android-sdk\extras\android\support\v7). Choose "AppCompat"
  2. Project-> properties->Android. In the section library "Add" and choose "AppCompat"
  3. That is all!

Note: if you are using "android:showAsAction" in menu item, you need to change prefix android as in the example http://developer.android.com/guide/topics/ui/actionbar.html


If, like me, you are following the Android tutorial on http://developer.android.com/training/basics/actionbar/setting-up.html and keep getting this error, try to change the AppBaseTheme style in all styles.xml files. In detail:

  1. In file res/values/styles.xml change the line:

    <style name="AppBaseTheme" parent="android:Theme.Light">
    

    to:

    <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
    
  2. In file res/values-v11/styles.xml change the line:

    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
    

    to:

    <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
    
  3. In file res/values-v14/styles.xml change the line:

    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    

    to:

    <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
    

Now the application should run fine.


I will share my experience with this problem. I was going crazy because of this, but I found out that the problem was a bug with Eclipse itself, rather than my code: In eclipse, unable to reference an android library project in another android project

So, if you have the Android Support Library in your C: drive and your project in the D: drive on your computer, Eclipse won't function correctly and won't know where the Android Support Library is (green tick turns into red cross). To solve this, you need to move both projects onto the same hard drive.