This morning I made an update to android studio from 3.0.1 to 3.1.0. After updating the gradle to latest version I still get build error regarding
This one is a very tricky bug with android studio and databinding! I had to test all this proposed solutions and some more for an entire day to finally make the databinding compile at least.
So I had to disable all databindind settings in gradle.properties file, just comment these lines or delete them:
android.databinding.enableV2 = true
android.enableExperimentalFeatureDatabinding = true
remove buildToolsVersion from build.gradle and have the following sdk versions:
compileSdkVersion 27
defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Plus a couple more clean/rebuild invalidate caches and restart, and it FINALLY compiled. AS engineers are great at creating bugs!