Skolson5903
08/22/2023, 1:05 AMjava.lang.NoSuchMethodError: No static method rememberDatePickerState
Project builds fine, but the exception occurs (in debug and release builds) in a Composable that calls rememberDatePickerState to set up the datepicker stuff.
I've seen this working before in MP, like in beta01 or 02. So I'm suspicious of something in rc01 but am unsure. Tomorrow I will start diagnosing, and will post again if I find more.
Anyone else having a problem using rememberDatePickerState function in MP?
FYI the import is:
import androidx.compose.material3.rememberDatePickerState
And Android Studio shows it's resolved by the klib below, but runtime fails:
org.jetbrains.compose.material3-material3-1.5.0-rc01-commonMain-m5L1mQ.klib
Skolson5903
08/22/2023, 1:57 AMrememberDatePickerState
has a new argument selectableDates
in 1.6.0-alpha03. selectableDates
argument is NOT in compose MP material 3's def for the same function. Don't
know when this new argument was added in android Compose. This different signature for the same method must be messing with the MP code at run time.
fun rememberDatePickerState(
@Suppress("AutoBoxing") initialSelectedDateMillis: Long? = null,
@Suppress("AutoBoxing") initialDisplayedMonthMillis: Long? = initialSelectedDateMillis,
yearRange: IntRange = DatePickerDefaults.YearRange,
initialDisplayMode: DisplayMode = DisplayMode.Picker,
selectableDates: SelectableDates = object : SelectableDates {}
): DatePickerState
I'll look at this more tomorrow. I'm guessing I'll need to figure out which Compose release has the original signature and go back to it for now.Skolson5903
08/22/2023, 2:13 AMDima Avdeev
08/22/2023, 10:39 AMSkolson5903
08/22/2023, 7:29 PMDima Avdeev
08/28/2023, 5:00 PM