I added apply plugin: 'kotlin-kapt'
to be able to use Rooms annotation proccessor:
compile "android.arch.persistence.room:runtime:1.0.0"
kapt "android.arch.persistence.room:compiler:1.0.0"
However when I build my project I get:
Folder C:\Users\...\app\build\generated\source\kaptKotlin\debug
Folder C:\Users\...\app\build\generated\source\kaptKotlin\release
3rd-party Gradle plug-ins may be the cause
If I get rid of kapt
and simply use annotationProcessor
instead. The app crashes saying:
java.lang.RuntimeException: cannot find implementation for com.example..data.database.Appdatabase. Appdatabase_Impl does not exist
Any ideas on how to use Room
I was facing similar issue.
Go to:
Run -> Edit Configurations -> General
At the bottom, there is window named
Before launch: Gradle-Aware, Active tool window
Remove
Instant App Provision
and keep Gradle-aware Make
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With