https://kotlinlang.org logo
Title
h

hikkidev

11/21/2019, 4:03 PM
Ladies and Gentlemen, whoever faced a similar problem? I am using Android Studio 4.0 Canary 4 and when using kotlinx.synthetic I get NPE
l

Luca Nicoletti

11/21/2019, 4:03 PM
You sure you’ve included the right file?
kotlinx.synthetic
can point to the wrong file if the same id is used in several
xml
files
h

hikkidev

11/21/2019, 4:07 PM
@Luca Nicoletti yes
this is - ok
Got NPE, button_save is null
On Android studio 3.5.2 everything works as it should...🤔
s

Sebi Sheldin Sebastian

11/21/2019, 4:29 PM
What's your gradle version and the kotlin version? Kotlin EAP might be screwing things up a little
I just checked on the latest Canary build with Kotlin 1.3.60 and gradle 4.0.0-alpha04 and all my view holder synthetics are working fine, the only difference from yours is I'm not using Moxy
h

hikkidev

11/21/2019, 5:04 PM
I found a problem.
gradle-wrapper.properties: distributionUrl=******/*gradle-6.0-rc*-*.zip It is necessary to use the stable version =) On gradle-6.0-all.zip - everything is ok
z

Zach Klippenstein (he/him) [MOD]

11/21/2019, 7:26 PM
Something to keep in mind for the future, there are also women in this slack, not just gentlemen 😉
i

itnoles

11/21/2019, 11:46 PM
I am suprising you are not using Jetpack Compose on AS 4.0
h

hikkidev

11/22/2019, 6:04 AM
@itnoles While exploring Jetpack Compose)
@Zach Klippenstein (he/him) [MOD] Yes you are absolutely right 😅