I've recently cloned an old project and to my surprise 2 fragments had issues with data binding.
1.
As you can see on the picture: Ive declared the binding variable(34), and initialized it accordingly(46).
2.
As seen on this function, some views are not recognized and some are.
The code works, the app compiles, but the IDE doesn't seem to recognize some of the views on my XML file.
Here's what I have tried so far
- Disable data binding by setting it to false and Re-enabling it.
- Changing the name of the XML file in order to get a different DataType on my binding variable.
- Changing the name of the view on Kotlin side, which ended up signaling an error because then data binding couldn't find it on the XML side.
- Ask for help on StackOverflow.
PS: After doing the steps above I've Invalidated the cache and restarted the IDE