Since version 3.1 of Android Gradle plugin, you no longer have to include databinding-compiler as annotation processor, as the plugin does it for you.
Except it only does that for your main source configuration, not androidTest. For UI/instrumentation tests you still need to include the compiler yourself:
In your library module's build.gradle file:
apply plugin: 'kotlin-kapt'
dependencies {
...
kaptAndroidTest 'androidx.databinding:databinding-compiler:3.3.2'
}
Since version
3.1of Android Gradle plugin, you no longer have to includedatabinding-compileras annotation processor, as the plugin does it for you.Except it only does that for your main source configuration, not
androidTest. For UI/instrumentation tests you still need to include the compiler yourself:In your library module's
build.gradlefile: