Here is my code
class BookmarkViewModel(app: Application) : AndroidViewModel(app) { private val dao = BookmarkDb.get(app).bookmarkDao() companion o
remove kapt "xxxx.xxx." if you still use that in you gradle.build since it'e been deprecated and add
apply plugin: 'kotlin-kapt'
at the end of your gradle.build for the app module. that fixed my problem in android studio 3.1