I just started to use Android Studio 3.0.0, but every time I try to build my project I get this error:
Error:Circular dependency between the following tasks:
:app:compileDebugKotlin
+--- :app:dataBindingExportBuildInfoDebug
| \--- :app:compileDebugKotlin (*)
\--- :app:kaptDebugKotlin
\--- :app:dataBindingExportBuildInfoDebug (*)
(*) - details omitted (listed previously)
I am using
kapt "com.android.databinding:compiler:2.2.0"
Before I was using
androidProcessor "com.android.databinding:compiler:2.2.0"
And it was working just fine... What I am doing wrong??
Thanks!
It seems that you need 3 gradle entries in the app .gradle at module level to add data binding
apply plugin: 'kotlin-kapt'
android {
...
dataBinding {
enabled = true
}
}
dependencies {
......
kapt "com.android.databinding:compiler:$compiler_version"
}
Notice that I made compiler version a variable in the project level build gradle so it can be managed from a single place
default was: ext.kotlin_version = '1.1.3-2'
I added with bracket syntax:
ext{
kotlin_version = '1.1.3-2'
compiler_version = '3.0.0-beta6'
}