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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by xgear-public
, 1 year ago
my.package.adapter.ChildViewHolder cannot be cast to my.package.adapter.GroupViewHolder
java.lang.ClassCastException: my.package.adapter.ChildViewHolder cannot be cast to my.package.adapter.GroupViewHolder
at my.package.adapter.MyAdapter.onCheckCanExpandOrCollapseGroup(SourceFile:44)
at com.h6ah4i.android.widget.advrecyclerview.expandable.ExpandableRecyclerViewWrapperAdapter.onTapItem(SourceFile:593)
at com.h6ah4i.android.widget.advrecyclerview.expandable.RecyclerViewExpandableItemManager.handleActionUpOrCancel(SourceFile:286)
at com.h6ah4i.android.widget.advrecyclerview.expandable.RecyclerViewExpandableItemManager.onInterceptTouchEvent(SourceFile:222)
at com.h6ah4i.android.widget.advrecyclerview.expandable.RecyclerViewExpandableItemManager$1.onInterceptTouchEvent(SourceFile:95)
at android.support.v7.widget.RecyclerView.dispatchOnItemTouchIntercept(SourceFile:2231)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1935)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2032)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2289)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2026)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:60)
at android.view.View.dispatchPointerEvent(View.java:7396)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3250)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3195)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4237)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4216)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4308)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:125)
at android.os.Looper.loop(Looper.java:124)
at android.app.ActivityThread.main(ActivityThread.java:4914)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:808)
at dalvik.system.NativeStart.main(NativeStart.java)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.