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 Nacos配置实时生效测试
Nacos配置实时生效测试
2
Spring Boot通过名称获取bean(applicationContext)
Spring Boot通过名称获取bean(applicationContext)
3
RadioButton在Android 4.4及以下调用setButtonDrawable(null)无效的问题
RadioButton在Android 4.4及以下调用setButtonDrawable(null)无效的问题
4
Hutool,一个实用的Java工具类库
Hutool,一个实用的Java工具类库
5
MongoDB后台管理Shell
MongoDB后台管理Shell
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。