I'm develiping an Android application in Eclipse, with minSdkVersion="8"
I want to use the theme generated by "android-holo-colors.com" but the file values/themes_apptheme.xml
throws an error in this line:
<style name="_AppTheme" parent="Theme.AppCompat.Light">
error: Error retrieving parent for item: No resource found that
matches the given name 'Theme.AppCompat.Light'.
This is what I've done so far:
Android SDK Manager
I downloaded Extras > Android Support Library
android-support-v7-appcompat.jar
from here: C:\Users\Administrator\android-sdks\extras\android\support\v7\appcompat\libs
to my project's library lib
I right clicked the jar in Eclipse, and then Build Path > Add to build path
(These 3 steps are also in Android's documentation)
I downloaded the generated .zip from android-holo-colors.com
and put all the files in their corresponding folders. Eg: I took all the xml's from the zip's drawable folder and place them in my project's drawable folder. Etc.
After doing all the above:
I'm getting the error stated at the beginning of my question.
So, the question is how do I solve this? (but previous questions can be: "am I including correctly the appcompat library?", "am I including correctly all the holo files?")
Some additional information that could be important:
My lib folder in the project also has android-support-v4.jar (if I right click on it, the possibility to add to build path is there, so I guess it is not in the build path)
I tried to use GridLayout the same way (steps 1-3) but I had a similar problem: the class GridLayout wasn't recognized/found
Well, solved...
Apparently just putting the .jar in my project and in its buildpath wasn't enough*.
After step 3 in my question, I would add:
In the same eclipse workspace, "import project from existing source" and select C:\Users\Administrator\android-sdks\extras\android\support\v7\appcompat
Right click in it, Properties > Android > "Is Library" must be checked (it already was after the previous step)
In my project, which is living in the same workspace, right click, Properties > Android > Under the "Library" section, click on "Add.." and add the android-support-v7-appcompat
project
(*) Although now is working, I'm not really sure if the step 2 and 3 in my question are necessary, because the project already "uses" the other project, which should create the same jar. If someone can clarify this last paragraph, would be great.