07-02 03:26
Notice
Recent Posts
Recent Comments
07-02 03:26
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Archives
Today
Total
관리 메뉴

pear

[android]data binding 5 - mistake error 본문

android/kotlin

[android]data binding 5 - mistake error

pearlab 2023. 6. 1. 18:39

miss @JvmStatic

miss match attribute

                    <EditText
                        app:text_num='@{viewmodel.num}' />

 

miss match @BindingAdapter("text_num")

miss match @InverseBindingAdapter(attribute = "text_num", event = "android:textAttrChanged")

 

 

two-way-binding build message

The expression 'viewmodelNum.getValue()' cannot be inverted, so it cannot be used in a two-way binding

 

 

one-way-binding fatal message

java.lang.RuntimeException: Unable to start activity ComponentInfo{`package name`}: java.lang.IllegalStateException: Required DataBindingComponent is null in class ActivityBindingImpl. A BindingAdapter in `package name` is not static and requires an object to use, retrieved from the DataBindingComponent. If you don't use an inflation method taking a DataBindingComponent, use DataBindingUtil.setDefaultComponent or make all BindingAdapter methods static.