Cannot reference a Holo theme from values-v11 / themes.xml

I am trying to use the Holo Light theme application if it runs on the device at a higher speed, but for some reason the values-v11 method does not work. I see that a bunch of other people seem to be using this method, but when I define my theme in res / values-v11 / themes.xml:

<resources> <style name="MainStyle" parent="@android:Theme.Holo.Light"> </style> </resources> 

Eclipse gives me error: Error retrieving parent for item: No resource found that matches the given name '@android:Theme.Holo.Light'. Same thing if I use android:Theme.Holo.Light or android:style/Theme.Holo.Light .

My minSdkVersion is 10, and my targetSdkVersion is 15.

Any ideas?

+8
android xml themes
source share
3 answers

I suspect you should use parent="@android:style/Theme.Holo.Light" . Make sure this is exactly the same - with the @ sign and everything.

From the comments: Also make sure that you set the target API (other than the target SDK) in the project properties (and not the manifest) of at least 4.0 / API 14.

+10
source share

Set the project build target to be higher than or equal to 14 and make sure you use the correct syntax for Theme.Holo.Light. It should be like this parent = "@android: style / Theme.Holo.Light"

0
source share

TextAppearance.Holo.Widget.ActionBar.Title seems to be added to API level 13. Make sure your build target is set to 13, not just 11.

AndroidManifest.xml:

 <uses-sdk android:minSdkVersion=... android:targetSdkVersion="11" /> 
0
source share

All Articles