The expression cannot be inverted, so it cannot be used in a two-way binding

Had a similar message but was using Kotlin, the way to fix it here was to use var instead of val for the bound value in the data class I was using. Hope this helps somebody …


Try using your modelData.websitevariable as an Observable or a MutableLiveData with the default value of "NA" and then bind the variable to your xml like so:

xml binding

android:text="@={modelData.website}"

java observable

public ObservableField<String> website = new ObservableField<>();

After that, simply set your values to website as needed.

Hope this helped, good luck!