Duplicate value for resource ‘attr/font’ with config “

It may the concept that makes conflicts with the logic that we have previously used for apply Custom fonts.

Previously

We have used below code for creating the custom attribute for the font.

    <declare-styleable name="CustomFont">
        <attr name="font" format="string" />
    </declare-styleable>

What I change

In my case, this was the issue and I have resolved it by renaming the attr name

    <declare-styleable name="CustomFont">
        <attr name="fontName" format="string" />
    </declare-styleable>

This same thing may apply if you are using any third party library or Custom View with “font” property

As per suggestion by reverie_ss Please Check your res->values->attrs.xml

Leave a Comment