MVC的一个老项目,需要从另一个MVVM的项目里移植过来一些功能,新建了一个module开启了databinding后报错
ClassNotFoundException: Didn't find class "android.databinding.DataBinderMapperImpl" on path
谷歌之,在Stack Overflow上看到一段提示:
Got my own lib and multiple apps. Had to add both to lib and app gradle files.
lib module与 app module都需要在gradle
文件中添加:
android {
....
dataBinding {
enabled = true
}
}