LiveData cannot be cast to MutableLiveData, otherwise an error will be reported.

java.lang.ClassCastException: androidx.room.RoomTrackingLiveData cannot be cast to androidx.lifecycle.MutableLiveData
Copy the code

java.lang.IllegalStateException: Cannot invoke observe on a background thread

You cannot register to listen for changes in child threads.