Android Studio fails to generate databinding after 3.1.0 update

Following the update to Android Studio 3.2, this line works for me. I have both Java and Kotlin code (compiler) running in my project.

Add the following to your gradle.properties: android.databinding.enableV2=false

Reason:

Data Binding V2

Data Binding V2 is now enabled by default and is compatible with V1. This means that, if you have library dependencies that you compiled with V1, you can use them with projects using Data Binding V2. However, note that projects using V1 cannot consume dependencies that were compiled with V2.

source (Release Note): https://developer.android.com/studio/releases/


Just Commenting these lines out in graddle-wrapper.properties file helped me solve my problem

#android.enableExperimentalFeatureDatabinding = true
#android.databinding.enableV2=true