When following the tutorial for setting up the Room persistence library I run in to this error when testing on an Android device.
java.lang.RuntimeException: cannot
You must add the annotation processor dependency to the module where your AppDatabase is. I assumed that the app would take the depencency from my API library module, where my data model classes are, but apparently this is not the case.
Answer came from this google issue: https://issuetracker.google.com/issues/67520422 And this SO answer: https://stackoverflow.com/a/43918701/1959110
I changed the 'annotationProcessor' keyword to 'kapt' in my gradle file. Like so:
kapt "android.arch.persistence.room:compiler:1.0.0"