Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Impl does not exist, Kotlin with Android Studio 3.0 #5

Closed
matthewfrost opened this issue Oct 27, 2017 · 0 comments
Closed

Impl does not exist, Kotlin with Android Studio 3.0 #5

matthewfrost opened this issue Oct 27, 2017 · 0 comments

Comments

@matthewfrost
Copy link

Using the latest version of Android Studio, Kotlin and Room. Database_impl does not exist when creating an instance of the database

gradle dependencies

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
}

Database class

@database(entities = arrayOf(Task::class), version = 1, exportSchema = false)
abstract class AppDatabase: RoomDatabase(){

companion object : SingletonHolder<AppDatabase, Context> ({
    Room.databaseBuilder(it.applicationContext,
            AppDatabase::class.java, "Tasks.db")
            .build()
})

abstract var taskDao : TaskDao

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant