6

This is the code in my res/values/themes.xml. My minSdkVersion is set to 11. M getting the error as Error retrieving parent for item:No resource found that matches the given name @style/Theme.Holo.

 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 <!-- the theme applied to the application or activity -->
 <style name="CustomActionBarTheme"
   parent="@style/Theme.Holo">
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
<item name="android:actionMenuTextColor">@color/actionbar_text</item>
</style>

<!-- ActionBar styles -->
<style name="MyActionBar"
   parent="@style/Widget.Holo.ActionBar">
<item name="android:titleTextStyle">@style/MyActionBarTitleText</item>
</style>

<!-- ActionBar title text -->
<style name="MyActionBarTitleText"
   parent="@style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">@color/actionbar_text</item>
</style>

<!-- ActionBar tabs text styles -->
<style name="MyActionBarTabText"
   parent="@style/Widget.Holo.ActionBar.TabText">
<item name="android:textColor">@color/actionbar_text</item>
</style>
</resources>
Girish K
  • 758
  • 1
  • 13
  • 24
sheetal
  • 189
  • 2
  • 5
  • 16
  • possible duplicate of [error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'](http://stackoverflow.com/questions/12295018/error-error-retrieving-parent-for-item-no-resource-found-that-matches-the-give) – Charan Pai Apr 30 '14 at 10:48

2 Answers2

14

change

<style name="CustomActionBarTheme" parent="@style/Theme.Holo">

to

<style name="CustomActionBarTheme" parent="@android:style/Theme.Holo">

and do the same for other style resources also...

Gopal Gopi
  • 11,101
  • 1
  • 30
  • 43
  • I have the same problem, I follow this and the problem is fixed, but can you explain why "parent="@style/Theme.Holo" doesn't work and we need to change it to "parent="@android:style/Theme.Holo". Many thanks! – Huy Than Aug 19 '14 at 11:21
1

Make sure your build target is set to 13, not just 11. or go through this...Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'

Community
  • 1
  • 1
krishna
  • 235
  • 2
  • 11