Two-way binding cannot resolve a setter for java.lang.String property

If you are working with kotlin , make sure data class field used for two way binding is declared as var. If it is val unable to support two way binding


This bug is ugly as hell and properly a bug in the data binding API. The solution is to generate a setter and a getter. I came up fast with the idea to create a setter, but not to create a getter.

Here is now my simplified model:

public class Address {
    public String street;

    public void setStreet(String street) {
        this.street = street;
    }

    public String getStreet() {
        return street;
    }
}

As you may note the getter and setter are useless, but required for two way binding.

If you think that this is a bug of the API please star my bug report: Two-way binding required setters AND ALSO getters