android之color不能单独作为标签使用,否则报tag requires a 'drawable' attribute or child tag defining a drawable

我发现android studio有一个奇怪的现象,不知是不是bug。
当我使用, 用单独标签“color”,用textColor属性上时,字体颜色居然变成了红色了




当我不将“color”单独作为一个标签时,也就是下面这种情况,居然又正常显示颜色了




使用了单独标签这种情况下ide会报

tag requires a 'drawable' attribute or child tag defining a drawable
意思就是item标签必须使用drawable属性定义

你可能感兴趣的:(android之color不能单独作为标签使用,否则报tag requires a 'drawable' attribute or child tag defining a drawable)