Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Attribute "title" has already been defined" after adding after adding android-support-v7-appcompat

Tags:

android

I have been banging my head on this all day long, but it seems I just cannot figure it out...

OK, so I add a project that was all fine and working.

In order to "rejuvinate" it I decided to add action bar with the appcompat library (as described here.

Since I have added the library I cannot compile the project anymore and I keep getting the following error :

C:\Users\Me\Documents\Dev\MyProject\res\values\widget_attributes.xml:9: error: Attribute "title" has already been defined 

The widget_attrributes.xml looks like this :

<?xml version="1.0" encoding="utf-8"?>
 <resources>
    <attr name="display" format="string" />
    <attr name="lineWidth" format="dimension" />    
    <attr name="lineColor" format="color|reference" />  
    <attr name="fillColor" format="color|reference" />

    <declare-styleable name="DigitalDisplay">
        <attr name="title" format="string" />
        <attr name="unit" format="string" />
        <attr name="display" />
        <attr name="valueFormat" format="string" />
        <attr name="showUnitInValue" format="boolean" />
        <attr name="showUnitInTitle" format="boolean" />
        <attr name="valueIsTime" format="boolean" />
        <attr name="titleTxtAppearance" format = "reference" />
        <attr name="valueTxtAppearance" format = "reference" />
        <attr name="unitTxtAppearance" format = "reference" />
    </declare-styleable>
.../...
</resources>

and I use the notation below when using my own widgets :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:droidfa="http://schemas.android.com/apk/res/com.droidfa"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

I must be doing something wrong, but I cannot figure out what...

Any help or hint will be much appreciated.

Thanks in advance, JM

like image 766
jmc34 Avatar asked Sep 04 '13 15:09

jmc34


1 Answers

Ok, in case someone reads this one day, the only way I could get out of there was by renaming my own attribute...

like image 121
jmc34 Avatar answered Nov 14 '22 05:11

jmc34