error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'

1.6k views Asked by At

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!--  Customize your theme here. -->
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:textColorPrimary">@color/colorTextPrimary</item>
    <item name="android:textColorSecondary">@color/colorTextSecondary</item>
</style>

This is the styles.xml file. The following code results in this error - i have put all the necessary libraries and jar files and i have also tried changing the syntax little bit and many stuff but I am not able to solve the problem. It is very important. Please help me. Thank you.

I have tried the following : You need to reference this AppCompat library in your Android project.

Import the library into Eclipse.

Right click on your Android project. Select properties. Click 'add...' at the bottom to add a library. Select the support library Clean and rebuild your project.

It still doesn't work.

Edit now :

I have installed android sdk 5.0 (API 21) but it still doesn't work. The line with the error is There were 3 other errors before installing android sdk 5.0 (API 21) in this file (styles.xml) but now they are gone. Please help me to remove the remaining error.

1

There are 1 answers

0
Newbee On

If you are using material in the manifest, you will get this error if your min version isn't API 21