java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true

Stack Overflow | Ivan Samsonov | 6 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Crash of recycler view

    Stack Overflow | 6 months ago | Ivan Samsonov
    java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Scrapped or attached views may not be recycled. isScrap:false isAttached:true

      at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal()
    2. Android v7
      DefaultItemAnimator$7.onAnimationEnd
      1. android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:4860)
      2. android.support.v7.widget.RecyclerView.removeAnimatingView(RecyclerView.java:1102)
      3. android.support.v7.widget.RecyclerView.access$6400(RecyclerView.java:147)
      4. android.support.v7.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished(RecyclerView.java:10260)
      5. android.support.v7.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished(RecyclerView.java:10760)
      6. android.support.v7.widget.SimpleItemAnimator.dispatchChangeFinished(SimpleItemAnimator.java:304)
      7. android.support.v7.widget.DefaultItemAnimator$7.onAnimationEnd(DefaultItemAnimator.java:362)
      7 frames
    3. Android Support v4
      ViewPropertyAnimatorCompatJB$1.onAnimationEnd
      1. android.support.v4.view.ViewPropertyAnimatorCompatJB$1.onAnimationEnd(ViewPropertyAnimatorCompatJB.java:47)
      1 frame
    4. Android Platform
      ActivityThread.main
      1. android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1114)
      2. android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1239)
      3. android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:766)
      4. android.animation.ValueAnimator$AnimationHandler$1.run(ValueAnimator.java:801)
      5. android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
      6. android.view.Choreographer.doCallbacks(Choreographer.java:670)
      7. android.view.Choreographer.doFrame(Choreographer.java:603)
      8. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
      9. android.os.Handler.handleCallback(Handler.java:739)
      10. android.os.Handler.dispatchMessage(Handler.java:95)
      11. android.os.Looper.loop(Looper.java:148)
      12. android.app.ActivityThread.main(ActivityThread.java:5417)
      12 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames