2

I added in my build.gradle file following:

android {

...

buildFeatures {
    viewBinding = true
}

...

}
}

I have a activity with many, many views (the customer want it so), and this throws following error: enter image description here

Is there a solution for this problem?

rescuemod
  • 33
  • 3

1 Answers1

3

It appears there is a limit to the number of views in a layout that will work with viewbinding. In my case I had a very large layout with many views. To ignore viewbinding for a specific layout add

tools:viewBindingIgnore="true"

to the root view of the layout. Just use an alternate method other than viewbinding to access the views in large layout.

Sneg
  • 276
  • 2
  • 5