- Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I am storing a Long in the same shared preferences as your MutableStateFlow is using. When trying to turn your preferences into ShredPreferences things crash:
java.lang.IllegalArgumentException: Unsupported type for value 1761326652892 at me.zhanghai.compose.preference.PreferenceFlow_androidKt.setPreferences(PreferenceFlow.android.kt:66) at me.zhanghai.compose.preference.PreferenceFlow_androidKt.access$setPreferences(PreferenceFlow.android.kt:1) at me.zhanghai.compose.preference.PreferenceFlow_androidKt$createPreferenceFlow$1$1$1.emit(PreferenceFlow.android.kt:49) at me.zhanghai.compose.preference.PreferenceFlow_androidKt$createPreferenceFlow$1$1$1.emit(PreferenceFlow.android.kt:49) at kotlinx.coroutines.flow.FlowKt__LimitKt$drop$2$1.emit(Limit.kt:22) at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:401) at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:233) at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:175) at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:147) at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:470) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$kotlinx_coroutines_core(CancellableContinuationImpl.kt:504) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$kotlinx_coroutines_core$default(CancellableContinuationImpl.kt:493) at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:359) at kotlinx.coroutines.flow.StateFlowSlot.makePending(StateFlow.kt:290) at kotlinx.coroutines.flow.StateFlowImpl.updateState(StateFlow.kt:354) at kotlinx.coroutines.flow.StateFlowImpl.setValue(StateFlow.kt:321) at me.zhanghai.compose.preference.PreferenceStateKt.rememberPreferenceState$lambda$4$lambda$3(PreferenceState.kt:37) at me.zhanghai.compose.preference.PreferenceStateKt.$r8$lambda$ogaDIDsMh9kalF6kpsNVDvOimho(Unknown Source:0) at me.zhanghai.compose.preference.PreferenceStateKt$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0) at me.zhanghai.compose.preference.AsMutableState.setValue(PreferenceState.kt:50) at me.zhanghai.compose.preference.ListPreferenceKt.ListPreference$lambda$3(ListPreference.kt:350) at me.zhanghai.compose.preference.ListPreferenceKt.ListPreference$lambda$5$lambda$4(ListPreference.kt:112) at me.zhanghai.compose.preference.ListPreferenceKt.$r8$lambda$1HSQOvL0_3k0mkbBFod9nL6QvJ4(Unknown Source:0) at me.zhanghai.compose.preference.ListPreferenceKt$$ExternalSyntheticLambda8.invoke(D8$$SyntheticClass:0) at me.zhanghai.compose.preference.ListPreferenceKt$ListPreference$11$1$1$1$1$1.invoke(ListPreference.kt:161) at me.zhanghai.compose.preference.ListPreferenceKt$ListPreference$11$1$1$1$1$1.invoke(ListPreference.kt:160)Metadata
Metadata
Assignees
Labels
No labels