因此,当我进行lint检查时,我收到此错误:
Error: Expected resource of type layout [ResourceType]
final EditTimeAdapter adapter = new EditTimeAdapter(getContext(), options, textColor);
(Squiggly line under textColor)
这是他们抱怨的代码:
public void setTextColor(@ColorRes int textColor) {
final EditTimeAdapter adapter = new EditTimeAdapter(getContext(), options, textColor);
EditTimeAdapter的构造函数:
public EditTimeAdapter(Context context, List<LocalTime> objects, @ColorRes int color) {
super(context, objects);
this.color = color;
}
所以,根据我的理解:1)这应该报告关于&#34; color&#34;的错误。而不是&#34;布局&#34;,和2)这不应该是一个错误。有人知道会发生什么事吗?