I have following fragment class written in Java using the new databinding library
import com.example.app.databinding.FragmentDataBdinding;
public class Data
The version of Data Binding compiler is same as gradle version in your project build.gradle file:
// at the top of file
apply plugin: 'kotlin-kapt'
android {
dataBinding.enabled = true
}
dependencies {
kapt "com.android.databinding:compiler:3.0.0-beta1"
}
and the gradle version is
classpath 'com.android.tools.build:gradle:3.0.0-beta1'
Here is an example link to complete using of databinding library in kotlin.
https://proandroiddev.com/modern-android-development-with-kotlin-september-2017-part-1-f976483f7bd6