lifecycleOwner property with databinding auto generated models
See original GitHub issueHi,
Thanks for this great library!
Having an issue after upgrading to Android Studio 3.1 which introduce the Android Architecture Components. If my layout includes another layout the setLifecycleOwner
method is being overridden in the generated binding class and then being treated as an attribute. This is causing a build time exception while the generated (*Model_) class is trying to use BR.lifecycleOwner
which doesn’t really exists.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Bind layout views to Architecture Components
The Data Binding Library works seamlessly with ViewModel components, which expose the data that the layout observes and reacts to its changes.
Read more >Android data binding : view does not update when property is ...
In case you might be experiencing this issue with LiveData , you might've forgotten to set lifecycle owner of your binding; binding.
Read more >StateFlow with One- and TwoWay-DataBinding on Android
While continuing working with the View layer let's create a Fragment. The key components to make our app work with binding are creating...
Read more >Advanced Data Binding in Android: Observables
You annotate areaCode with the Bindable annotation. This lets the Data Binding Library generate an entry for it in a class, BR.java. ·...
Read more >Application Building Simplified With Data Binding - Innominds
This class holds all the bindings from the layout properties, i.e. the defined variable to the corresponding views. It also provides generated ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks everybody that put up a fix. I have merged one and am pushing it in release 2.11.0 right now. Should be live in 30 minutes or so.
I meet the same issue when upgrading to Android Studio 3.1