My top level build.gradle:
buildscript {
ext.kotlin_version = \'1.2.41\'
ext.lifecycle_version = \"1.1.1\"
repositories {
google()
After researching quite a bit, turns out there are a couple things to add in order to use data binding library
buildscript {
ext {
compiler_version = '3.1.3'
}
dependencies {
classpath "com.android.tools.build:gradle:$compiler_version"
}
}
apply plugin: 'kotlin-kapt'
android {
dataBinding {
enabled = true
}
}
dependencies {
kapt "com.android.databinding:compiler:$compiler_version"
}
kapt {
generateStubs = true
}
I started to have some warnings after adding the data binding library, like 3rd-party Gradle plug-ins may be the cause
and Classpath entry points to a non-existent location
. But compiles and runs fine