<? xml version = "1.0" encoding = "utf-8" ?>
< resources >
< declare-styleable name= "PreferenceHeader" >
<!-- Identifier value for the header. -->
< attr name= "id" format = "integer"/>
< attr name= "icon" format = "integer" />
<!-- The fragment that is displayed when the user selects this item. -->
</declare-styleable >
< declare-styleable name= "Preference" >
< attr name= "icon" format = "integer" />
<!-- The key to store the Preference value. -->
< attr name= "key" format = "string" />
</declare-styleable >
</ resources >
<? xml version = "1.0" encoding = "utf-8" ?>
< resources >
< attr name = "icon" format = "integer" />
< declare-styleable name= "PreferenceHeader" >
<!-- Identifier value for the header. -->
< attr name= "id" format = "integer"/>
< attr name= "icon" />
<!-- The fragment that is displayed when the user selects this item. -->
</declare-styleable >
< declare-styleable name= "Preference" >
< attr name= "icon" />
<!-- The key to store the Preference value. -->
< attr name= "key" format = "string" />
</declare-styleable >
</ resources >
多个类定义attr属性重复的问题:Attribute "xxx" has already been defined
原文地址:http://blog.csdn.net/a2758963/article/details/39159365