ViewTooltip icon indicating copy to clipboard operation
ViewTooltip copied to clipboard

NoClassDefFoundError

Open jonahollman opened this issue 5 years ago • 4 comments

When attempting to show a tooltip, I get this error:

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/widget/NestedScrollView

Here is my code:

toolTip = ViewTooltip
     .on(holder.flareifiedIcon)
     .autoHide(false, 1000)
     .clickToHide(true)
     .corner(16)
     .position(ViewTooltip.Position.BOTTOM)
     .customView(tooltipView)
     .onDisplay {
         toolTipShowing = true
     }
     .onHide {
         if (tooltipView.parent != null) {
             (tooltipView.parent as ViewGroup).removeView(tooltipView)
             toolTipShowing = false
         } 
     }
toolTip!!.show()

jonahollman avatar Jan 09 '19 01:01 jonahollman

The same error

pavel-vorobyev avatar Jan 11 '19 09:01 pavel-vorobyev

Ditto:

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/widget/NestedScrollView;
        at com.github.florent37.viewtooltip.ViewTooltip.findScrollParent(ViewTooltip.java:95)
        at com.github.florent37.viewtooltip.ViewTooltip.<init>(ViewTooltip.java:46)
        at com.github.florent37.viewtooltip.ViewTooltip.on(ViewTooltip.java:77)

mdvarga avatar Jan 29 '19 22:01 mdvarga

Looks like this issue is related to this library using AndroidX for version 1.2.x - and the project that I'm working on hasn't migrated to use AndroidX yet.

I reverted to use 1.1.8 (i.e. pre-AndroidX) and the library is working fine now.

mdvarga avatar Jan 29 '19 22:01 mdvarga

What if we want to use it with Android X?

PankajS24 avatar Aug 19 '19 05:08 PankajS24