android studio编译的报错提示:cannot find implementation for com.lwz.conn.db.MyDatabase. MyDatabase_Impl does not exist
解决问题,步骤:
第一步骤,如果使用了kotlin项目,不要忘记在顶部引用kotlin-kapt插件
apply plugin: 'kotlin-kapt'
第二步骤,如果使用的是 Kotlin 语言开发 , 导入依赖库时 , 需要使用 kapt 导入注解处理器
kapt "androidx.room:room-compiler:$room_version"
同步后可以看,如下图: