Skip to content Skip to sidebar Skip to footer

Weird Databinding In Android

I try to figure out how to work with data binding in Android and met a strange problem. When I put my ViewModel class in some package, generated ActivityMainBinding can't see it an

Solution 1:

I ran into this as well. Thanks to tynn for answering my question.

According to tynn, it is because we didn't follow the oracle naming conventions for packages. The package name should be all lowercase. Changing "ViewModels" to "viewmodels" fixed it for me.

Solution 2:

Post a Comment for "Weird Databinding In Android"