I am using android\'s data binding library for views in a library project
i have added the following line in my root gradle file
classpath \'
I had the same problem after performing the migration androdx. I tried all the above methods but not resolved. I suddenly found that I used
com.android.tools.build:gradle version is 3.3. I update it to 3.5. Problem is solved.
project build.gradle:
classpath 'com.android.tools.build:gradle:3.3.0'
Update to
classpath 'com.android.tools.build:gradle:3.5.0'
Redo the migration.
I had the same problem, but I solved it removing
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
from the global build.gradle and removing
apply plugin: 'android-apt'
from the local build.gradle, then it worked like a charm.
It seems it was a mixed problem with Butterknife too. Pretty weird.
Make sure that ALL your modules that use DataBinding have it enabled. This was the reason I got that exception.
android {
....
dataBinding {
enabled = true
}
}