Comments (8)
I've just found out the problem. Will be fixed in next release. As temporary solution please add to you ProGuard config next lines
-keep,allowoptimization class * implements androidx.viewbinding.ViewBinding {
public static *** bind(android.view.View);
public static *** inflate(...);
}
from viewbindingpropertydelegate.
I had a similar problem (v1.4.4) and in version 1.4.5 everything works well.
from viewbindingpropertydelegate.
Check version 1.4.5
from viewbindingpropertydelegate.
Getting same issue in 1.5.8.
from viewbindingpropertydelegate.
Getting same issue in 1.5.8.
Show me the stacktrace and the code with usage of ViewBinding in that place
from viewbindingpropertydelegate.
Getting same issue in 1.5.8.
Show me the stacktrace and the code with usage of ViewBinding in that place
Here is the stacktrace.
Caused by: java.lang.NoSuchMethodException: com.ppm.pace365app.databinding.ActivitySignInBinding.bind [class android.view.View]
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getMethod(Class.java:1693)
at by.kirich1409.viewbindingdelegate.internal.BindViewBinding.<init>(ViewBindingCache.kt:116)
at by.kirich1409.viewbindingdelegate.internal.ViewBindingCache.getBind$com_github_kirich1409_ViewBindingPropertyDelegate_core(ViewBindingCache.kt:29)
at by.kirich1409.viewbindingdelegate.ReflectionActivityViewBindings$viewBinding$2.invoke(ActivityViewBindings.kt:61)
at by.kirich1409.viewbindingdelegate.ReflectionActivityViewBindings$viewBinding$2.invoke(ActivityViewBindings.kt:60)
at by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.getValue(ViewBindingProperty.kt:102)
at by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.getValue(ViewBindingProperty.kt:71)
When I tried 1.4.5, it was working fine, but getting the issue in 1.5.8.
Update: Hey, just found that it is working on 1.5.6 too. But I'm still getting crash on 1.5.8.
from viewbindingpropertydelegate.
-keep,allowoptimization class * implements androidx.viewbinding.ViewBinding {
public static *** bind(android.view.View);
public static *** inflate(...);
}
This worked. Thanks
from viewbindingpropertydelegate.
There is a similar crash in 1.5.9 as well:
Caused by: java.lang.NoSuchMethodException: my.project.databinding.MiisFragmentShowcaseBinding.bind [class android.view.View]
at java.lang.Class.getMethod(Class.java:2103)
at java.lang.Class.getMethod(Class.java:1724)
at by.kirich1409.viewbindingdelegate.internal.BindViewBinding.<init>(ViewBindingCache.kt:14)
at by.kirich1409.viewbindingdelegate.ReflectionFragmentViewBindings$viewBinding$3.invoke(FragmentViewBindings.kt:28)
at by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.getValue(ViewBindingProperty.kt:8)
at by.kirich1409.viewbindingdelegate.FragmentViewBindingProperty.getValue(FragmentViewBindings.kt:3)
at by.kirich1409.viewbindingdelegate.FragmentViewBindingProperty.getValue(FragmentViewBindings.kt:2)
at my.project.ShowcaseFragment.getBinding(ShowcaseFragment.kt:8)
...
Adding the proguard rules helps:
-keep,allowoptimization class * implements androidx.viewbinding.ViewBinding {
public static *** bind(android.view.View);
public static *** inflate(...);
}
from viewbindingpropertydelegate.
Related Issues (20)
- 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
- Generic type cannot be used HOT 5
- how to use 'noreflection:1.5.6' in this case? HOT 3
- Random crash when navigating between fragments back and forth. HOT 3
- Is it possible to provide support for viewBinding(ViewBinding::inflate) HOT 2
- java.lang.IllegalStateException: Fragment's view can't be accessed HOT 1
- Fatal Exception: java.lang.IllegalStateException: Host view isn't ready. LifecycleViewBindingProperty.isViewInitialized return false HOT 1
- How to correctly use a generic? View blank and onViewCreated() not called in Fragment nor Base HOT 1
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.