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

voben

07/01/2019, 2:30 PM
Android studio(v 3.4.1) refuses to recognize the
Livedata.observe()
extension, and whenever I do a ‘go to declaration’, it keeps taking me to the java LiveData observe function. How do I get it to recognize the kotlin extension and highlight it in yellow? Already tried invalidate cache and restart
r

rook

07/01/2019, 2:53 PM
Make sure there’s only one namespace importing a function called
observe
v

voben

07/01/2019, 2:56 PM
there’s only one
l

louiscad

07/02/2019, 10:31 AM
Are you using the ktx artifact with the correct version?
v

voben

07/02/2019, 2:54 PM
I updated to AS 3.5 preview and that fixed the issue. Still doesn’t work on 3.4.1 though
3 Views