I am trying to implement listener bindings, but when I run my code I get the following error:
Caused by: android.databinding.tool.util.LoggedErrorException: F
Rebuilding
project worked for me.
Build>Rebuild
Build>Rebuild
Just rebuild the project. It is probably because you did some refactoring
Work for me. If the order mix or miss , its not working for me.
I just had that issue and I have managed to solve it by deleting .idea, .gradle and gradle folders and let Android Studio recreate whole project from scratch from gradle files.
As suggested by all other fellow brothers, yes the error resolves after deleting .idea, .gradle and gradle folders.
(this is just for someone curious why this happens, below is my usecase): i think this problem caused in my project because of i added one rxRecycleViewDataBinding custom library lately which might caused some binding errors by mixing binding references.
If a similar kind of problem is encountered for a member variable of type LiveData
then check your lambda in the XML file as for calling a function in onClick
of a view "@{() -> variableName.callMethod()}"
is used whereas for a variable "@{variableName.memeberVariableName}"
is used.