java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2

Stack Overflow | user1378824 | 4 months ago
  1. 0

    Simple Adapter, Invalid index when filtering

    Stack Overflow | 2 years ago | M0NKEYRASH
    java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Set Condition on checkbox, in android

    Stack Overflow | 2 years ago | Haya suleman
    java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
  4. 0

    java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2

    Stack Overflow | 2 years ago | Rohit Goyal
    java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2

  1. filpgame 1 times, last 2 weeks ago
  2. Aria Pahlavan 6 times, last 2 weeks ago
  3. bmacedo 4 times, last 2 weeks ago
  4. MoYapro 5 times, last 2 weeks ago
  5. Alexandru Popa 12 times, last 2 weeks ago
63 more registered users
32 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.IndexOutOfBoundsException

    Invalid index 2, size is 2

    at java.util.ArrayList.throwIndexOutOfBoundsException()
  2. Java RT
    ArrayList.get
    1. java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
    2. java.util.ArrayList.get(ArrayList.java:308)
    2 frames
  3. dk.forsoegsperson.fp
    MainActivity$AdAdapter.getView
    1. dk.forsoegsperson.fp.MainActivity$AdAdapter.getView(MainActivity.java:261)
    1 frame
  4. Android Platform
    FrameLayout.onLayout
    1. android.widget.AbsListView.obtainView(AbsListView.java:2346)
    2. android.widget.ListView.makeAndAddView(ListView.java:1875)
    3. android.widget.ListView.fillDown(ListView.java:702)
    4. android.widget.ListView.fillSpecific(ListView.java:1366)
    5. android.widget.ListView.layoutChildren(ListView.java:1662)
    6. android.widget.AbsListView.onLayout(AbsListView.java:2148)
    7. android.view.View.layout(View.java:16630)
    8. android.view.ViewGroup.layout(ViewGroup.java:5437)
    9. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
    10. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
    11. android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
    12. android.view.View.layout(View.java:16630)
    13. android.view.ViewGroup.layout(ViewGroup.java:5437)
    14. android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
    15. android.widget.FrameLayout.onLayout(FrameLayout.java:273)
    16. android.view.View.layout(View.java:16630)
    17. android.view.ViewGroup.layout(ViewGroup.java:5437)
    18. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
    19. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
    20. android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
    21. android.view.View.layout(View.java:16630)
    22. android.view.ViewGroup.layout(ViewGroup.java:5437)
    23. android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
    24. android.widget.FrameLayout.onLayout(FrameLayout.java:273)
    25. android.view.View.layout(View.java:16630)
    26. android.view.ViewGroup.layout(ViewGroup.java:5437)
    27. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
    28. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
    29. android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
    30. android.view.View.layout(View.java:16630)
    31. android.view.ViewGroup.layout(ViewGroup.java:5437)
    32. android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
    33. android.widget.FrameLayout.onLayout(FrameLayout.java:273)
    33 frames
  5. Android
    PhoneWindow$DecorView.onLayout
    1. com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
    1 frame
  6. Android Platform
    ActivityThread.main
    1. android.view.View.layout(View.java:16630)
    2. android.view.ViewGroup.layout(ViewGroup.java:5437)
    3. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2171)
    4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
    5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
    6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
    7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
    8. android.view.Choreographer.doCallbacks(Choreographer.java:670)
    9. android.view.Choreographer.doFrame(Choreographer.java:606)
    10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
    11. android.os.Handler.handleCallback(Handler.java:739)
    12. android.os.Handler.dispatchMessage(Handler.java:95)
    13. android.os.Looper.loop(Looper.java:148)
    14. android.app.ActivityThread.main(ActivityThread.java:5417)
    14 frames
  7. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  8. 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