Listener Binding; Cannot Find the Setter

前端 未结 9 2081
梦如初夏
梦如初夏 2020-12-16 10:18

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         


        
相关标签:
9条回答
  • 2020-12-16 10:54

    Rebuilding project worked for me.

    • Rebuild project from Build>Rebuild
    • Fix issues if you get in build logs.
    • Rebuild project again from Build>Rebuild
    0 讨论(0)
  • 2020-12-16 10:55

    Just rebuild the project. It is probably because you did some refactoring

    0 讨论(0)
  • 2020-12-16 10:57
    1. Delete .gradle folder.
    2. Run the project.
    3. Clean the project.
    4. Run the project.

    Work for me. If the order mix or miss , its not working for me.

    0 讨论(0)
  • 2020-12-16 10:59

    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.

    0 讨论(0)
  • 2020-12-16 11:05

    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.

    0 讨论(0)
  • 2020-12-16 11:06

    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.

    0 讨论(0)
提交回复
热议问题