出现error: No resource identifier found for attribute的问题,如果你使用了自定义的标签,可能是因为没有在res/values中加入attrs文件。
文件格式如下:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="memdata">
<attr format="integer" name="id" />
<attr format="string" name="name" />
<attr format="integer" name="classId" />
<attr format="string" name="q" />
<attr format="string" name="a" />
</declare-styleable>
</resources>
本文深入解析了在Android开发过程中遇到的'error: No resource identifier found for attribute'错误的原因,并提供了详细的解决方案。通过在res/values目录下添加attrs文件,正确声明资源属性,开发者可以避免此类常见错误,提升开发效率。
3645

被折叠的 条评论
为什么被折叠?



