Since the new Android Studio 3.6 update, my databinding classes show "Cannot resolve symbol"
The code itself is completely fine and it even compiles successfully, but everywhere I'm calling the binding classes, Android Studio gives me the "Cannot resolve symbol" error. This goes through every class or xml I'm using databinding in.
Did anyone of you experience the same? It seems weird, that the update to 3.6 did that. Gradle version used is 3.6.1
Thank you!
Edit: I for now have taken every step I can as a developer, reconfigured everything, tried on different machines etc. I'm not sure if this is a problem of the project I'm working on or a bug of 3.6 that only occurs when some criterias are met, since I'm not the only one, having this exact problem. Below is a screenshot of it to give you an idea how it looks.
Final Edit
Seems like upgrading to the Android Studio 4.0 Beta 1 fixed the problem for me now. This seems to be an Android Studio 3.6 related issue. Don't know if using a beta version is a possible solution for you, but for me this solved it completely
ViewBinding vs DataBindingThe main advantages of viewbinding are speed and efficiency. It has a shorter build time because it avoids the overhead and performance issues associated with DataBinding due to annotation processors affecting DataBinding's build time.
You can't use them togheter in the same layout. ViewBinding is a subset of what DataBinding can do and should be used if you want to replace libraries like ButterKnife , KotterKnife or KAE (Kotlin Android Extensions) but don't want to invest in databinding refactoring.
The Data Binding Library is a support library that allows you to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
Seems like upgrading to the Android Studio 4.0 Beta 1 fixed the problem for me now. This seems to be an Android Studio 3.6 related issue. Don't know if using a beta version is a possible solution for you, but for me this solved it completely
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With