Style TextAppearance.Holo not found
I have been building this app for a while now and have not had any trouble with the themes until I updated to the latest platform tools today. Now it's telling me
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Medium.Inverse'.
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Medium'.
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Large'.
This is the part of my styles.xml that is causing the problem but, as I said, it hasn't changed in months and worked fine until today!
<style name="BD.TextAppearance.Medium.Inverse" parent="@android:style/TextAppearance.Holo.Light.Medium.Inverse">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BD.TextAppearance.Medium" parent="@android:style/TextAppearance.Holo.Light.Medium">
<item name="android:textColor">#666666</item>
<item name="android:textSize">16sp</item>
</style>
<style name="BD.TextAppearance.Large" parent="@android:style/TextAppearance.Holo.Light.Large">
<item name="android:textColor">#666666</item>
<item name="android:textSize">20sp</item>
</style>
-= EDIT =- I s开发者_如何学Ctarted messing around with the values and it turns out that it does find these styles:
<style name="BD.TextAppearance" parent="@android:style/TextAppearance">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BD.TextAppearance.Medium.Inverse" parent="@android:style/TextAppearance.Medium.Inverse">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
But not these:
<style name="BD.TextAppearance" parent="@android:style/TextAppearance.Holo">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BD.TextAppearance.Medium.Inverse" parent="@android:style/TextAppearance.Light.Medium.Inverse">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
I still don't know why this happened but I have found a way around it. I copied the styles.xml file from the Android SDK and pasted it into my project and took out all of the styles that I wasn't using. The I changed all of the 'parent' declarations to include the '@android:' prefix and added 'android:' after the '?' for all attributes. This allows it to compile and run. But like I said I would really like to find out why it broke in the first place!
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Medium.Inverse'.
I too face the Same problem what i did is that just i removed the
parent="@android:style/TextAppearance.Holo.Light.Medium.Inverse"
attribute. It will works check it.
精彩评论