Jorn
Jorn

Reputation: 272

Data binding stops working when upgrade Gradle to 3.5.1

I have just upgraded the version of my Gradle from:

'com.android.tools.build:gradle:3.5.0'

to

'com.android.tools.build:gradle:3.5.1'

And the data binding from my project has stopped working. I have tried to rebuild the project, even I have tried to entirely delete the build folder from my project but with no luck. Android Studio is complaining with the following error:

Type parameter T has incompatible upper bounds: ViewDataBinding and ActivityMainBinding

Please see this screenshot.

If I downgrade to 3.5.0, everything works fine. How to get rig of this error?

Upvotes: 2

Views: 565

Answers (1)

Rezaul Islam
Rezaul Islam

Reputation: 123

Please do the following:

  • Rename your layout to "actvity_main2.xml"
  • Rename this file back to the original "actvity_main.xml"

Hope this works!

Upvotes: 2

Related Questions