java.lang.ClassCastException: my.package.adapter.ChildViewHolder cannot be cast to my.package.adapter.GroupViewHolder

GitHub | xgear-public | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    onCheckCanExpandOrCollapseGroup can not cast child ViewHolder to group Viewholder

    GitHub | 10 months ago | xgear-public
    java.lang.ClassCastException: my.package.adapter.ChildViewHolder cannot be cast to my.package.adapter.GroupViewHolder

    Root Cause Analysis

    1. java.lang.ClassCastException

      my.package.adapter.ChildViewHolder cannot be cast to my.package.adapter.GroupViewHolder

      at my.package.adapter.MyAdapter.onCheckCanExpandOrCollapseGroup()
    2. my.package.adapter
      MyAdapter.onCheckCanExpandOrCollapseGroup
      1. my.package.adapter.MyAdapter.onCheckCanExpandOrCollapseGroup(SourceFile:44)
      1 frame
    3. com.h6ah4i.android
      RecyclerViewExpandableItemManager$1.onInterceptTouchEvent
      1. com.h6ah4i.android.widget.advrecyclerview.expandable.ExpandableRecyclerViewWrapperAdapter.onTapItem(SourceFile:593)
      2. com.h6ah4i.android.widget.advrecyclerview.expandable.RecyclerViewExpandableItemManager.handleActionUpOrCancel(SourceFile:286)
      3. com.h6ah4i.android.widget.advrecyclerview.expandable.RecyclerViewExpandableItemManager.onInterceptTouchEvent(SourceFile:222)
      4. com.h6ah4i.android.widget.advrecyclerview.expandable.RecyclerViewExpandableItemManager$1.onInterceptTouchEvent(SourceFile:95)
      4 frames
    4. Android v7
      RecyclerView.onInterceptTouchEvent
      1. android.support.v7.widget.RecyclerView.dispatchOnItemTouchIntercept(SourceFile:2231)
      2. android.support.v7.widget.RecyclerView.onInterceptTouchEvent(SourceFile:2277)
      2 frames
    5. Android Platform
      ViewGroup.dispatchTouchEvent
      1. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1935)
      2. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      3. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      4. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      5. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      6. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      7. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      8. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      9. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      10. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      11. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      12. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      13. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      14. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      15. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      16. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
      17. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
      17 frames
    6. Android
      PhoneWindow.superDispatchTouchEvent
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2026)
      2. com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1476)
      2 frames
    7. Android Platform
      Activity.dispatchTouchEvent
      1. android.app.Activity.dispatchTouchEvent(Activity.java:2473)
      1 frame
    8. Android v7
      WindowCallbackWrapper.dispatchTouchEvent
      1. android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:60)
      2. android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:60)
      2 frames
    9. Android
      PhoneWindow$DecorView.dispatchTouchEvent
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1974)
      1 frame
    10. Android Platform
      ActivityThread.main
      1. android.view.View.dispatchPointerEvent(View.java:7396)
      2. android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3250)
      3. android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3195)
      4. android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4237)
      5. android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4216)
      6. android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4308)
      7. android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
      8. android.os.MessageQueue.nativePollOnce(MessageQueue.java)
      9. android.os.MessageQueue.next(MessageQueue.java:125)
      10. android.os.Looper.loop(Looper.java:124)
      11. android.app.ActivityThread.main(ActivityThread.java:4914)
      11 frames
    11. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Method.java)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    12. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:808)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:575)
      2 frames
    13. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(NativeStart.java)
      1 frame