Search code examples
androidandroid-studioandroid-buildandroid-viewbinding

Android after adding viewBinding true app can't build


I've fully working application, then I've decided to migrate to viewBinding and it does not build anymore.

Here is my error - It seems like it's generating wrong binding classes, not sure, please help enter image description here

My gradle setup - enter image description here

enter image description here


Solution

  • It looks like you have a toggle_style.xml file in your layout directory that isn't actually a layout. You'll want to move that to the correct directory so that View Binding doesn't try to process that file.