Style attribute attr/@attr/minTextSize not found

て烟熏妆下的殇ゞ 提交于 2019-12-02 01:07:07

Well, in my case it happened when i upgraded build tools, to resolve this issue, you should have two attr files like in this image:

Add these lines in both of attr.xml files:

 <style name="SquareTextView">
         <item name="minTextSize">5dp</item>
    </style>
    <declare-styleable name="SquareTextView"><attr format="dimension" name="minTextSize"/></declare-styleable>

This resolved the issue i was facing. Hope it helps someone.

The issue is with some of the gradles added in project. Actually the libraries internally have defined the attribute minTextSize

Due to latest updates and compatibility the attr was not found.

To identify I have defined same attr as

<attr name="minTextSize" format="integer">16</attr>

in attrs.xml in my app module. Compiling the same thrown error of duplicate value and path and from that path I have found the library which needs to be updated.

Updating to the latest of all library version have solved the issue.

vicky keshri

If you don't have attrs.xml, then create one. After that add this snippet.

<?xml version="1.0" encoding="utf-8"?> 
<resources>
           <style name="SquareTextView">
               <item name="minTextSize">5dp</item>
           </style>
           <declare-styleable name="SquareTextView">
             <attr format="dimension" name="minTextSize"/>
           </declare-styleable>
 </resources>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!