Data binding setup:
apply plugin: \'kotlin-kapt\'
android {
dataBinding {
enabled = true
}
}
dependencies {
kapt \"com.android.databind
I run into this very error. I did 2 things: 1. Added kaptAndroidTest 'androidx.databinding:databinding-compiler:3.5.1' in gradle 2. Used the databinding, that is to say, I create a fake bool variable and injected it for real in a view. It would seem that you cannot just use databinding for retrieving the views instead of issuing the dreaded findViewById. You have to use it at least once in your module. Once you use it you are fine for all the other classes in your module.