当前位置: 代码迷 >> 综合 >> setTag使用错误The key must be an application-specific resource id.
  详细解决方案

setTag使用错误The key must be an application-specific resource id.

热度:36   发布时间:2023-12-17 21:53:05.0
12-10 16:50:56.101: E/AndroidRuntime(28051): java.lang.IllegalArgumentException: The key must be an application-specific resource id.

在res/values/ids.xml中添加:

<resources>
    <item type="id" name="tag_user"></item>
    <item type="id" name="tag_group"></item>    
</resources>



convertView.setTag(R.id.tag_group, groupHolder);

convertView.getTag(R.id.tag_group)


  相关解决方案