liaohuqiu / android-Ultra-Pull-To-Refresh

Ultra Pull to Refresh for Android. Support all the views.
MIT License
9.58k stars 2.65k forks source link

IndexOutOfBoundsException Inconsistency detected #309

Open fajarpnugroho opened 7 years ago

fajarpnugroho commented 7 years ago

Hi, anyone have struggling with this exception? any solution?

Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{1d0d38e position=21 id=-1, oldPos=20, pLpos:20 scrap [attachedScrap] tmpDetached not recyclable(1) no parent} at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5297) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5479) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:595) at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3534) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3310) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at in.srain.cube.views.ptr.PtrFrameLayout.layoutChildren(PtrFrameLayout.java:260) at in.srain.cube.views.ptr.PtrFrameLayout.onLayout(PtrFrameLayout.java:229) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1795) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:131) at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42) at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1391) at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:870) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.support.design.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1167) at android.support.design.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:852) at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:871) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1193) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) at android.widget.FrameLayout.onLayout(FrameLayout.java:281) at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:3175) at android.view.View.layout(View.java:18014) at android.view.ViewGroup.layout(ViewGroup.java:5911) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2787) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2480) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1544) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7619) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:622) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7407) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

fkose696 commented 5 years ago

@fajarpnugroho were you able to resolve the issue?