0
votes

I'm using the AppCompat Support Library, but I can't use some of the themes and attributes.

For example, when I try to use Theme.AppCompat.Light.NoActionBar I get this error:

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

and when I try to use colorPrimary and colorPrimaryDark:

Error: No resource found that matches the given name: attr 'colorPrimary'.

Error: No resource found that matches the given name: attr 'colorPrimaryDark'.

What could it be?

my themes.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- the theme applied to the application or activity -->
<style name="CustomActionBarTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">#FF0000</item>
</style>
1
@Blackbelt i'm using themes.xml, just posted it.Edgar
@Edgar, Because You use NoActionBar. You can not noactionbar with colorprimary. Can you change parent="Theme.AppCompat.Light.DarkActionBar" ?msevgi
@mustafasevgi same error.Edgar
How are you integrating AppCompat? (=including in the project)Florent Anders
@FlorentAnders Imported the project from the sdk and added the reference to android properties.Edgar

1 Answers

0
votes

The problem seems to be in eclipse, i just migrated my project to Android Studio and this solved the problem.