Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'

I am implementing ActionBar to set the color for text using this style script in xml but getting error when I run my application time does anybody have idea what I have missing

this is my style.xml file

<!-- Start with the Holographic Light theme --> <style name="Theme.IOSched" parent="android:style/Theme.Holo.Light">     <item name="android:windowBackground">@drawable/window_background</item>     <item name="android:actionBarStyle">@style/ActionBar</item>      <!-- custom attributes      <item name="textHeaderMaxLines">@integer/text_header_max_lines</item>     <item name="trackAbstractMaxLines">@integer/track_abstract_max_lines</item>--> </style>  <style name="Theme.IOSched.Home" parent="style/Theme.IOSched">     <item name="android:windowBackground">@drawable/window_background_home</item>     <item name="android:actionBarStyle">@style/ActionBar</item> </style>  <style name="ActionBar" parent="android:style/Widget.Holo.Light.ActionBar">     <item name="android:background">@color/actionbar_background</item>     <item name="android:textColor">@color/accent_1</item>     <item name="android:titleTextStyle">@style/ActionBarText</item> </style>  <style name="ActionBarText" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"> <!-- getting here error-->     <item name="android:textColor">@color/accent_1</item>     <item name="android:textStyle">bold</item> </style>  error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'. 
like image 245
Pratik Avatar asked Dec 21 '11 13:12

Pratik


2 Answers

TextAppearance.Holo.Widget.ActionBar.Title appears to have been added in API Level 13. Make sure your build target is set to 13, not just 11.

like image 188
CommonsWare Avatar answered Nov 08 '22 06:11

CommonsWare


AndroidManifest.xml:

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

and

Project Properties -> Project Build Target = 11 or above

These 2 things fixed the problem for me!

like image 38
WindRider Avatar answered Nov 08 '22 06:11

WindRider