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

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.


This is an issue that can happen in Android Studio if you modify Project Structure Modules.In this case you may need to add the dependencies again. In a text editor edit the 'build.gradle' file to include the required dependencies:

dependencies {    compile 'com.android.support:appcompat-v7:+'    compile fileTree(dir: 'libs', include: ['*.jar'])}

This should update your '{your_project_name}.iml' file with lib components:

<orderEntry type="library" exported="" name="appcompat-v7-19.0.1" level="project" />