I am running into issues trying to take a function as a parameter in a binding adapter using Kotlin/Android databinding. This example code throws e: error: cannot generate
The declaration () -> Unit suggests a function which takes no input and returns nothing (Unit is the return type in this statement). Your function should look like this: