0
点赞
收藏
分享

微信扫一扫

Class is referenced as a converter but it does not have any converter methods. - androidx.databindin


背景

使用Room时,出现报错:

Class is referenced as a converter but it does not have any converter methods. - androidx.databinding.adapters.Converters

解决方案

在网上查了很多资料,都没有找到和我这边匹配的。后来根据报错信息“androidx.databinding.adapters.Converters”,搜索了一下“Converters”,结果有了意外的发现。

我的AppDatabase类是从另外一个项目中copy过来修改的,里面有​​@TypeConverters(Converters::class)​​。

那个项目用到了类型转化,但是我当前还没有,删除即可。

Class is referenced as a converter but it does not have any converter methods. - androidx.databindin_安卓开发技术

更多技术总结好文,请关注:「程序园中猿」



举报

相关推荐

0 条评论