I used ActionBar Style Generator, and now trying to use into my app, but getting :
error: Error retrieving parent for item: No resource found that matches the given name '@style/ Theme.AppCompat.Light.DarkActionBar'.
i am using android-support-v7-appcompat.jar lib inside libs folder
my target is to make my app compatible 2.3 or above
If you're using Eclipse, then add the
reference library
into your project as the following steps:Project Explorer
View.Properties
.Android
in theProperties
window.Library
group, clickAdd...
OK
.OK
button again in the Properties window.If you are using Eclipse just copying android-support-v7-appcompat.jar to libs folder will not work if you are going to use resources.
Follow steps from here for "Adding libraries with resources".
In Eclipse: When importing a support library as a project library following the instructions at Adding Support Libraries, don't forget to check the option "Copy proyects into workspace"!
A simple solution - replace contents this file (/res/values/styles.xml) to this is text:
make sure there is a v7 directory in your sdk, I thought having the 'Android Support Library' (in Extras) was sufficient. Turns out I was missing the 'Local Maven repository for Support Libraries (extras;android;m2repository)' Studio found that actually and fixed the gradle dependencies. using gradle to build then worked. $ cat app/build.gradle
AppCompat
is a library project. You need to reference the library project in your android project.Check the topic Adding libraries with resources.