java.lang.IllegalArgumentException: called detach on an already detached child ViewHolder{154c4fd1 position=2 id=-1, oldPos=-1, pLpos:-1 scrap [attachedScrap] tmpDetached no parent}

GitHub | SaltedFish999 | 2 months ago
  1. 0

    GitHub comment 36#253971663

    GitHub | 2 months ago | SaltedFish999
    java.lang.IllegalArgumentException: called detach on an already detached child ViewHolder{154c4fd1 position=2 id=-1, oldPos=-1, pLpos:-1 scrap [attachedScrap] tmpDetached no parent}
  2. 0

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

    Stack Overflow | 12 months ago | pamu
    java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true
  3. 0

    GitHub comment 75#222593322

    GitHub | 6 months ago | gao746700783
    java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false isAttached:true
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Possible bug in GridLayoutManager?

    Stack Overflow | 1 year ago | Kent Hawkings
    java.lang.IllegalArgumentException: Item at position 0 requires 2 spans but GridLayoutManager has only 1 spans.
  6. 0

    Android RecyclerView IllegalArgumentException: called detach on an already detached child ViewHolder

    Stack Overflow | 2 months ago | Gurudutt
    java.lang.IllegalArgumentException: called detach on an already detached child ViewHolder{7c7ecfb position=2 id=-1, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}

  1. tone5992 2 times, last 7 months ago
6 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    called detach on an already detached child ViewHolder{154c4fd1 position=2 id=-1, oldPos=-1, pLpos:-1 scrap [attachedScrap] tmpDetached no parent}

    at android.support.v7.widget.RecyclerView$5.detachViewFromParent()
  2. Android v7
    RecyclerView.onLayout
    1. android.support.v7.widget.RecyclerView$5.detachViewFromParent(RecyclerView.java:710)
    2. android.support.v7.widget.ChildHelper.detachViewFromParent(ChildHelper.java:284)
    3. android.support.v7.widget.RecyclerView$LayoutManager.detachViewInternal(RecyclerView.java:7301)
    4. android.support.v7.widget.RecyclerView$LayoutManager.detachViewAt(RecyclerView.java:7294)
    5. android.support.v7.widget.RecyclerView$LayoutManager.scrapOrRecycleView(RecyclerView.java:7699)
    6. android.support.v7.widget.RecyclerView$LayoutManager.detachAndScrapAttachedViews(RecyclerView.java:7682)
    7. android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:546)
    8. android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3315)
    9. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3124)
    10. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3568)
    10 frames
  3. Android Platform
    ViewGroup.layout
    1. android.view.View.layout(View.java:16112)
    2. android.view.ViewGroup.layout(ViewGroup.java:5185)
    3. android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195)
    4. android.view.View.layout(View.java:16112)
    5. android.view.ViewGroup.layout(ViewGroup.java:5185)
    6. android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
    7. android.widget.FrameLayout.onLayout(FrameLayout.java:574)
    8. android.view.View.layout(View.java:16112)
    9. android.view.ViewGroup.layout(ViewGroup.java:5185)
    10. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
    11. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
    12. android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
    13. android.view.View.layout(View.java:16112)
    14. android.view.ViewGroup.layout(ViewGroup.java:5185)
    14 frames
  4. Android Support v4
    ViewPager.onLayout
    1. android.support.v4.view.ViewPager.onLayout(ViewPager.java:1767)
    1 frame
  5. Android Platform
    ActivityThread.main
    1. android.view.View.layout(View.java:16112)
    2. android.view.ViewGroup.layout(ViewGroup.java:5185)
    3. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
    4. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
    5. android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
    6. android.view.View.layout(View.java:16112)
    7. android.view.ViewGroup.layout(ViewGroup.java:5185)
    8. android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
    9. android.widget.FrameLayout.onLayout(FrameLayout.java:574)
    10. android.view.View.layout(View.java:16112)
    11. android.view.ViewGroup.layout(ViewGroup.java:5185)
    12. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
    13. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
    14. android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
    15. android.view.View.layout(View.java:16112)
    16. android.view.ViewGroup.layout(ViewGroup.java:5185)
    17. android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
    18. android.widget.FrameLayout.onLayout(FrameLayout.java:574)
    19. android.view.View.layout(View.java:16112)
    20. android.view.ViewGroup.layout(ViewGroup.java:5185)
    21. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2548)
    22. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2233)
    23. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1330)
    24. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6705)
    25. android.view.Choreographer$CallbackRecord.run(Choreographer.java:800)
    26. android.view.Choreographer.doCallbacks(Choreographer.java:603)
    27. android.view.Choreographer.doFrame(Choreographer.java:572)
    28. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
    29. android.os.Handler.handleCallback(Handler.java:815)
    30. android.os.Handler.dispatchMessage(Handler.java:104)
    31. android.os.Looper.loop(Looper.java:192)
    32. android.app.ActivityThread.main(ActivityThread.java:5865)
    32 frames