https://kotlinlang.org logo
Title
s

sujin

02/23/2018, 4:36 PM
I'm trying some databinding with kotlin. but the BR.class is not generating any variables related to the data class. I have included the databinding library too. Any reason how this is happening?
mainBinding.setVariable(BR.temp, temp)
BR.temp gives unresolved reference
g

gildor

02/24/2018, 4:48 AM
Do you have
kapt "com.android.databinding:compiler:$"
in your dependencies?
s

sujin

02/24/2018, 5:29 AM
im currently using
kapt 'com.android.databinding:compiler:3.0.1'
g

gildor

02/24/2018, 12:48 PM
Do you have data binding enabled in all your modules?
s

sujin

02/24/2018, 3:34 PM
The main reason for error was incorrect setters in the data class which prevented two way data binding and hence the build was not completed.