所以我一直在使用android.support库中的@WorkerThread和@UiThread批注,并且都运行良好,但是现在我已经将项目迁移到使用androidx库而不是支持库,现在到处都是我正在调用一个标有@WorkerThread的方法,即使我从中调用它的方法也被标为@WorkerThread,它仍然显示红色为错误。 有人可以帮忙吗?
示例情况:
CreateMap<AccessResultSp, AccessResultViewModel>()
.ForMember(dest => dest.ShowAccess,
opts => opts.MapFrom((src =>Tobool(src.ShowAccess)))
)
.ReverseMap()
public class AccessResultViewModel
{
public bool? ShowAccess { get; set; }
}
编码仍然可以按预期进行编译和运行,但是当它实际上不是错误时,烦人的将所有红色变为红色。