https://kotlinlang.org logo
#android
Title
# android
a

azabost

03/02/2017, 12:23 PM
Anyone using Kotlin 1.1 with Android Data Binding?
d

deviant

03/02/2017, 12:52 PM
azabost: yep. works flawlessly.
a

azabost

03/02/2017, 12:59 PM
@deviant thanks for the feedback. I started to think I'm the only one and it will crash sooner or later 🙂
l

lovis

03/02/2017, 1:05 PM
works for me too
m

Marc

03/02/2017, 1:17 PM
works but not with AS 2.3 with the new gradle pluguin (for me at least)
a

azabost

03/02/2017, 1:41 PM
@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

lovis

03/02/2017, 3:28 PM
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

Marc

03/02/2017, 3:34 PM
dos it worked for you @lovis ?
l

lovis

03/02/2017, 3:35 PM
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

bryan

03/02/2017, 5:29 PM
Works for me!
a

aoriani

03/02/2017, 6:15 PM
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

lovis

03/03/2017, 8:36 AM
@aoriani this was fixed for me after I applied
apply plugin: ‘kotlin-kapt’
a

aoriani

03/03/2017, 9:51 AM
@lovis oh, I didn’t notice the extra plugin. Thank you so much ! 😄
👍 1
m

Marc

03/03/2017, 10:53 AM
@kalpeshp0310 look at taht it may help you
k

kalpeshp0310

03/03/2017, 10:55 AM
@Marc thanks. just saw that.
👍 1
a

azabost

03/03/2017, 12:45 PM
Works for me too 🙂
20 Views