Type ‘TypeVariable(T)’ has no method ‘getValue(Nothing?, KProperty<*>)’ and thus it cannot serve as a delegate
現象
var name by rememberSaveable { mutableStateOf("") }
って構文を使おうとした時にタイトルのエラーでた。
対応
import androidx.compose.runtime.getValue import androidx.compose.runtime.setValue
を追加。
参考
r/android_devs - Jetpack Compose - am I stupid or is the 'by remember {}' syntax not working properly?
15 votes and 11 comments so far on Reddit
コメント