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
Valid case: This error is raised if you have an error in the xml file. First read carefully through the xml and if you find a problem fix it.
Invalid case: For me the issue was raised for a file that was already deleted from the project or the file was renamed and the databinding was referencing the old file.
I'm not sure how to get rid of the issue every time but I have a number of things that sometimes work and sometimes don't.
Fix number 1:
Running 'gradle wrapper' in the project root.
Fix number 2:
Android Studio Clean Project
Next delete these folders in the project root:
rm -rf .gradle/
rm -rf app/build/
rm -rf build
rm -rf gradle
rm -rf gradlew
Android Studio Invalidate and restart
Everything should be back to normal now.