본문 바로가기
Android/Android 에러

Android StateFlow DataBinding 중 Cannot find a setter 문제

by 쎄오SseO 2023. 9. 29.

 

 

Cannot find a setter for <androidx.appcompat.widget.AppCompatButton currentSelected> that accepts parameter type 'kotlinx.coroutines.flow.StateFlow<java.lang.String>'

If a binding adapter provides the setter, check that the adapter is annotated correctly and that the parameter type matches.

 

브랜치를 옮기기 전에는 잘 되었으나 브랜치를 옮기고 나니 에러가 발생

Binding 타입 등에도 문제가 없지만 오류가 발생하여 여러가지를 시도해보았습니다

 

StateFlow가 정상적으로 동작하지 않는 판단에 Coroutine 버전을 올려주었더니 해결 완료