android cannot generate view binders android.databinding.tool.util.LoggedErrorException
错误: Cannot resolve type 'viewModel'
错误: cannot generate view binders android.databinding.tool.util.LoggedErrorException: failure, see logs for details.
Cannot resolve type 'viewModel'
at android.databinding.tool.util.L.printMessage(L.java:134)
at android.databinding.tool.util.L.e(L.java:107)
at android.databinding.tool.expr.Expr.getResolvedType(Expr.java:391)
at android.databinding.tool.expr.ExprModel.lambda$resolveTypes$1(ExprModel.java:626)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at android.databinding.tool.expr.ExprModel.resolveTypes(ExprModel.java:626)
at android.databinding.tool.expr.ExprModel.seal(ExprModel.java:418)
at android.databinding.tool.LayoutBinder.sealModel(LayoutBinder.java:245)
at android.databinding.tool.DataBinder.sealModels(DataBinder.java:88)
at android.databinding.tool.CompilerChef.sealModels(CompilerChef.java:371)
at android.databinding.annotationprocessor.ProcessExpressions.writeResourceBundle(ProcessExpressions.java:245)
这个很明显是databinding错误,也就是与xml有关,,,但错误日志里没有说明是具体哪个文件..
<variable
name="viewModel" type="xxx.xxx.yourViewModel"/>
在很多xml中用到,所以难查找(...这里建议大家不要xml中有相同的命名,不难很难找到)
后面想起是一个 xxxViewModel 被删除了,但xml中还引用到,引起的报错
posted on 2021-12-20 14:12 caosiqiao 阅读(1122) 评论(0) 编辑 收藏 举报