Previously i used the ADT10.0 . In this version i am not getting any errors regarding styles. After i updated my ADT to 18.0. Now i got the following error.
error: Error retrieving parent for item: No resource found that matches the given name ‘@android:style/Widget.RatingBar.Small’.
How can I solve this? I saw somewhere to solve this import the styles using http://source.android.com/source/downloading.html but it’s not understandable please can any body help me?
<style name="reviewRatingBar1" parent="@android:style/Widget.RatingBar.Small" >
<item name="android:progressDrawable">@drawable/review_rating_bar_full</item>
<item name="android:minHeight">13dip</item>
<item name="android:maxHeight">13dip</item>
</style>
According to the
android.R.styledocumentation there isn’t aWidget.RatingBar.Smallstyle (any longer), which appears to be the reason why Eclipse is giving you that error.Comparing the
styles.xmlfiles from e.g. API level 7 and 15 it appears that the style isn’t public anymore. If I try to reference it in Eclipse, I actually get an error message that confirms thisAs far as I can tell, there are several options you have here:
style="?android:attr/ratingBarStyleSmall"when you declare theRatingBar. You can, however, not inherit from this theme-based style, so any customizations to the default ‘small’ style will have to be copied over to all your other small rating bars.Widget.Holo.RatingBar.SmallorWidget.Holo.Light.RatingBar.Small. You probably design your app against either one, so you’ll know at design time which style to inherit from.RatingBarfurther down anyhow, so you may be able to get away with just inheriting from the regularRatingBarstyle?