you have to add annotationProcessorOptions
in app level gradle.
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.your.packagename"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// add below section
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
}