I'm getting a weird Kotlin compiler error? Anyone ...
# compose
c
I'm getting a weird Kotlin compiler error? Anyone know how to solve these?
Copy code
Internal error: Couldn't inline method call 'state$default' into @androidx.compose.Composable public inline fun <T> `state$default`(noinline areEquivalent: ((T, T) -> kotlin.Boolean)?, init: () -> T, `$mask0`: <http://kotlin.Int|kotlin.Int>, `$handler`: kotlin.Any?): androidx.compose.MutableState<T> defined in androidx.compose <no source>
✔️ 1
a
Changing
state
to
mutableStateOf
worked for me
🙏 1
c
Hey, that worked! Thank you!
So, I got a different error after trying that (this time related to
setContent
) so after some research I realized I was using an outdated Kotlin compiler extension. I resolved it and was able to keep using
state
by updating this line:
Copy code
kotlinCompilerExtensionVersion "0.1.0-dev07"