Android repeated custom properties: ../ attrs.xml: Error: Found item Attr / rightTextColor more than one time

Custom attributes for different attribute domain, using the same attribute name, it will throw an error:
../attrs.xml: Error: Found item Attr/rightTextColor more than one time

<declare-styleable name="s1">
	<attr name="rightTextColor"  format="color"/>
</declare-styleable>

<declare-styleable name="s2">
	<attr name="rightTextColor"  format="color"/>
</declare-styleable>

Resolution:
The property is defined in the external, internal only declarative referential.

<attr name="rightTextColor" format="color" />

<declare-styleable name="s1">
	<attr name="rightTextColor"/>
</declare-styleable>

<declare-styleable name="s2">
	<attr name="rightTextColor"/>
</declare-styleable>
Published 400 original articles · won praise 364 · Views 1.62 million +

Guess you like

Origin blog.csdn.net/jjwwmlp456/article/details/102796860
Recommended