Duplicate value for resource 'attr/font' with config "

Solution 1:

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

Solution 2:

support library 26 added font attribute to XML elements like TextView, etc. In my case, I was using a library with custom views and a custom attribute app:font, so they collided. After renaming the library attribute to something else (textFont), all went good again. So, are you using a custom 'font' attribute somewhere? Did you update Gradle to supportLibrary 26 or 27 recently? If you can't override the attribute name, try rolling back to 25