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