Comments (4)
Fix has been added to develop and in few hours version 1.4.4 will be available
from viewbindingpropertydelegate.
I tried to upgrade Fragment to 1.3.0 and Lifecycle to 2.3.0 on our side, but the crash is still happening.
I've also tried to use the library like in the samples (noreflection):
private val binding by viewBinding(OnboardingContainerFragmentBinding::bind)
But it didn't work too (same crash).
from viewbindingpropertydelegate.
Another useful information: we're using the library with Databinding, not ViewBinding.
from viewbindingpropertydelegate.
The reason is that you access to binding before ViewLifecycleOwner is created. The latest version of the library prevent such kind behaviour. Based on your sample I see this isn't perfect solution. Temporary fix for you is
class OnboardingContainerFragment : BaseFragment() {
private val binding by viewBinding(OnboardingContainerFragmentBinding::bind)
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
): View = inflater.inflate(R.layout.onboarding_container_fragment, container, false)
from viewbindingpropertydelegate.
Related Issues (20)
- java.lang.IllegalStateException Fragment's view can't be accessed. Fragment isn't added HOT 1
- IllegalStateException when using viewBinding for onCreateView HOT 14
- Can give a sample of how to use RecyclerView.ViewHolder? HOT 1
- IllegalStateException: Fragment's view can't be accessed. HOT 6
- IllegalStateException FragmentViewBindingProperty.getLifecycleOwner HOT 1
- UnresolvedReference HOT 2
- Crash on language change HOT 7
- Android Studio Dolphin | 2021.3.1 does not show layout preview HOT 2
- IllegalStateException: Fragment's view can't be accessed. Fragment isn't added. - when trying to restore fragment state HOT 1
- Kkk
- Custom views are crashing preview after updating Android Studio up to Dolphin HOT 1
- Hgf
- Version 1.5.8 onwards causes error in RecyclerView HOT 1
- NoClassDefFoundError HOT 1
- Clear happens after onViewCreated HOT 3
- Cresh issue HOT 2
- Crash HOT 1
- java.lang.IllegalStateException: Host view isn't ready to create a ViewBinding instance HOT 4
- Lint errors when updated to 1.5.6 HOT 1
- Access to viewBinding after Lifecycle is destroyed or hasn't created yet. The instance of viewBinding will be not cached. HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viewbindingpropertydelegate.