-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
val testList: MutableLiveData<MutableList<String>> by serialLiveData(null)
fun addTest(text: String) {
val currentList = testList.value ?: mutableListOf()
currentList.add(text)
testList.value = currentList
}
使用了 MutableList 或者 List ,都不行,都会报错
kotlinx.serialization.SerializationException: Serializer for class 'ArrayList' is not found.
Please ensure that class is marked as '@serializable' and that the serialization compiler plugin is applied.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels