Android DataBinding 采坑记录

NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl

app module 和 相关的 子 module 均需配置

android {

    dataBinding {
        enabled = true
    }
}

Cause: couldn’t make a guess for xxx

Cause: couldn't make a guess for cc.androidx.app_widget.adapter.BaseRecyclerViewAdapter.entity.Person

错误分析: 问题出在type引用对象的包名包含了大写
解决方法: 包路径都为小写

<data>
    <variable
        name="person"
        type="cc.androidx.app_widget.adapter.brva.entity.Person"/>

    <variable
        name="presenter"
        type="cc.androidx.app_widget.adapter.brva.entity.PersonPresenter"/>
</data>
上一篇 Android Butterknife 采坑记录
下一篇 ARouter 接入踩坑记录
目录
文章列表
1 Atlas加载Facebook登录的远程Bundle设计
Atlas加载Facebook登录的远程Bundle设计
2
appium自动化测试(9)-appium-api-之应用操作
appium自动化测试(9)-appium-api-之应用操作
3
Prometheus + Grafana 使用 redis_exporter 监控 Redis
Prometheus + Grafana 使用 redis_exporter 监控 Redis
4
Nacos实现不同应用之间共享配置
Nacos实现不同应用之间共享配置
5
Spring Boot 实现ErrorController接口处理404、500等错误页面
Spring Boot 实现ErrorController接口处理404、500等错误页面
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。