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

Goose

12/04/2020, 5:15 AM
However, I’m seeing an error with LiveData. Basically, saying LiveData is abstract (which makes sense) and
Initializer is not allowed here because this property has no backing field
n

Nuru

12/11/2020, 6:57 PM
You're not supposed to initialize the LiveData, you're supposed to set a custom getter for it, of which you're doing wrongly. It's supposed to look like this: val word:LiveData<String> get() = _word
10 Views