Reputation: 7824
After hours of fighting with android-studio and HoloEverywhere+ActionBarSherlock, I finally managed to set everything up; The holoeverywhere classes are found in android-studio. However, upon "Make" or "Compile" of my project, I am getting the following errors:
Gradle: Error retrieving parent for item: No resource found that matches the given name 'Holo.Theme'.
Gradle: No resource found that matches the given name: attr 'actionBarSize'.
Gradle: Error retrieving parent for item: No resource found that matches the given name 'Holo.Theme.Light'.
Gradle: No resource found that matches the given name: attr 'actionBarSize'.
Now, in my themes.xml
file, I create some styles that inherit from Holo.Theme
and Holo.Theme.Light
. It did work in Eclipse, and since HoloEverywhere seems to be found and is added as a dependency of my project, why does gradle not find these definitions?
The code is, as usual:
<style name="MyTheme" parent="Holo.Theme.Light">
...
<item name="actionBarSize">48dip</item>
<item name="android:actionBarSize">48dip</item>
...
</style>
Thank you for your help!
By the way, the styles are found by android-studio, since it doesn't complain in the editor. Only when I make or compile, these errors appear.
Another thing, which may help: I tried removing the HoloEverywhere Stuff from the xml, and compile, and gradle also complained about the Java classes. So, it appears as if gradle doesn't find anything of HoloEverywhere. Do I have to add it to the build.gradle or something?
Upvotes: 2
Views: 2303
Reputation: 136
Add the library resource path to your project's build.gradle file:
sourceSets {
main {
res.srcDirs = ['src/main/res','(library-res-path)']
}
}
Upvotes: 1