TagView 类里面的 这行代码 float tagWidth = tagView.getPaint().measureText(tag.text ) + textPaddingLeft + textPaddingRight; 建议优化一下,tag.text为null的时候判断下。