javaandroideclipseandroid-holo-everywhere

Trying to use "android-holo-colors.com" and "AppCompat"


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:

  1. With Android SDK Manager I downloaded Extras > Android Support Library
  2. I copied the file android-support-v7-appcompat.jar from here: C:\Users\Administrator\android-sdks\extras\android\support\v7\appcompat\libs to my project's library lib
  3. I right clicked the jar in Eclipse, and then Build Path > Add to build path

    (These 3 steps are also in Android's documentation)

  4. 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:

  1. 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)

  2. I tried to use GridLayout the same way (steps 1-3) but I had a similar problem: the class GridLayout wasn't recognized/found


Solution

  • 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:

    (*) 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.