Type ‘TypeVariable(T)’ has no method ‘getValue(Nothing?, KProperty<*>)’ and thus it cannot serve as a delegateってエラー

スポンサーリンク
スポンサーリンク

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

を追加。

スポンサーリンク

参考

Blocked

コメント

  1. […] rt androidx.compose.runtime.setValue https://dalomo.net/blog/2021/04/03/1342/ […]

タイトルとURLをコピーしました