2013-09-04 14 views
5

Przez cały dzień waliłem w głowę, ale wydaje mi się, że po prostu nie mogę tego rozgryźć ...Tytuł "Atrybut" "został już zdefiniowany" po dodaniu po dodaniu funkcji Android-support-v7-appcompat

OK, więc dodaję projekt, który był w porządku i działa.

W celu „rejuvinate” to postanowiłem dodać pasek działań z AppCompat biblioteki (jak opisano here

Od dodałem biblioteki nie mogę skompilować projekt już i wciąż otrzymuję następujący błąd.:

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

widget_attrributes.xml wygląda następująco:

<?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> 

i używam notacji poniżej podczas używania OW n widżety:

<?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" > 

muszę robić coś złego, ale nie mogę dowiedzieć się, co ...

Każda pomoc lub wskazówka będzie mile widziane.

Dzięki z góry, JM

Odpowiedz

11

Ok, w przypadku gdy ktoś czyta ten jeden dzień, to jedyny sposób mogę dostać się stamtąd było przez zmianę nazwy własne atrybut ...

+0

Dokładnie ten sam problem tutaj . Dzięki @ jmc34 – bob

+2

tak, ssie ogromną nakrętkę, ponieważ wszystkie atrybuty są połączone w jeden. Firma Google powinna była z góry rozważyć ten problem –

Powiązane problemy