Search code examples
androideclipseadt

Error using Android Design Support Library: attr backgroundTint not found


Trying to use the new Design Support Library in my project, AAPT throws the following error:

Description: Error: No resource found that matches the given name: attr 'backgroundTint'.
Resource:    /design/res/values/styles.xml
Location:    line 21 

This is the affected entry in styles.xml:

<style name="Widget.Design.FloatingActionButton" parent="android:Widget">
    <item name="android:background">@drawable/fab_background</item>
    <item name="backgroundTint">?attr/colorAccent</item>
    <item name="fabSize">normal</item>
    <item name="elevation">@dimen/fab_elevation</item>
    <item name="pressedTranslationZ">@dimen/fab_translation_z_pressed</item>
    <item name="rippleColor">?attr/colorControlHighlight</item>
    <item name="borderWidth">@dimen/fab_border_width</item>
</style>

I'm targeting my project to use SDK 21, with min SDK set to 17.

Edit: I have all SDK tools up to date.


Solution

  • I was able to fix the issue with @igece solution, but later I found out that the real issue is an outdated appcompat-v7 library.

    After upgrading it to the latest version nothing had to be edited on Google's libraries.