Coder Social home page Coder Social logo

Comments (8)

kirich1409 avatar kirich1409 commented on September 7, 2024 6

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.

alexkopenkov avatar alexkopenkov commented on September 7, 2024 1

I had a similar problem (v1.4.4) and in version 1.4.5 everything works well.

from viewbindingpropertydelegate.

kirich1409 avatar kirich1409 commented on September 7, 2024

Check version 1.4.5

from viewbindingpropertydelegate.

sandip-torinit avatar sandip-torinit commented on September 7, 2024

Getting same issue in 1.5.8.

from viewbindingpropertydelegate.

kirich1409 avatar kirich1409 commented on September 7, 2024

Getting same issue in 1.5.8.

Show me the stacktrace and the code with usage of ViewBinding in that place

from viewbindingpropertydelegate.

sandip-torinit avatar sandip-torinit commented on September 7, 2024

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.

sandip-torinit avatar sandip-torinit commented on September 7, 2024

-keep,allowoptimization class * implements androidx.viewbinding.ViewBinding {
public static *** bind(android.view.View);
public static *** inflate(...);
}

This worked. Thanks

from viewbindingpropertydelegate.

al-t avatar al-t commented on September 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.