Anyone using Kotlin 1.1 with Android Data Binding?
# android
a
Anyone using Kotlin 1.1 with Android Data Binding?
d
azabost: yep. works flawlessly.
a
@deviant thanks for the feedback. I started to think I'm the only one and it will crash sooner or later 🙂
l
works for me too
m
works but not with AS 2.3 with the new gradle pluguin (for me at least)
a
@Marc good to know! I have just tested it myself and also having problems with AS 2.3 RC1 and Kotlin 1.1 (kapt exception when generating sources for Data Binding)
l
to make this work you need to
kapt “com.android.databinding:compiler:2.3.0-rc1"
⬅️ important to use the correct databinding compiler version
❤️ 1
and also, always delete the whole
build
folder when upgrading android studio and or kotlin 😂
m
dos it worked for you @lovis ?
l
yes
This works for me: Android Studio
2.3
Kotlin-AS-Plugin:
1.1.0-release-Studio2.3-1
Kotlin
1.1.0
Copy code
apply plugin: ‘kotlin-kapt’

…

kapt “com.android.databinding:compiler:$plugin_version”
kapt “com.google.dagger:dagger-compiler:$dagger_version”
kapt “com.jakewharton:butterknife:$butterknife_version”
where
Copy code
plugin_version = "2.3.0"
dagger_version = "2.2"
butterknife_version = "7.0.1"
kotlin_version = "1.1.0"
oh yeah and
Copy code
task wrapper(type: Wrapper) {
    gradleVersion = '3.3'
}
❤️ 4
b
Works for me!
a
I am still having problems :
Copy code
Execution failed for task ':app:compileDevDebugAndroidTestJavaWithJavac'.
> java.lang.RuntimeException: Failed to parse data binding compiler options. Params:
  kapt.annotations : /Users/aoriani/Development/myapp/app/build/tmp/kapt/devDebugAndroidTest/wrappers/annotations.devDebugAndroidTest.txt
  kapt.kotlin.generated : /Users/aoriani/Development/myapp/app/build/tmp/kapt/devDebugAndroidTest/kotlinGenerated
l
@aoriani this was fixed for me after I applied
apply plugin: ‘kotlin-kapt’
a
@lovis oh, I didn’t notice the extra plugin. Thank you so much ! 😄
👍 1
m
@kalpeshp0310 look at taht it may help you
k
@Marc thanks. just saw that.
👍 1
a
Works for me too 🙂