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

Samebug tips

  1. ,
    Expert tip

    Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range. Applications can subclass this class to indicate similar exceptions.

  2. ,

    Thrown if trying to access an index which is out of bounds on objects like String, Array, or Vector. Any negative integer less than or equal to -1 and positive integer greater than or equal to the size of the object is an index which would be out of bounds

Solutions on the web

via GitHub by waitingal
, 1 year ago
Invalid index 2, size is 2
via GitHub by leowhiterussian
, 1 year ago
Invalid index 3, size is 1
via GitHub by optnio00
, 11 months ago
Invalid index 0, size is 0
via Stack Overflow by developer
, 2 years ago
java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2	at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)	at java.util.ArrayList.get(ArrayList.java:308)	at com.xdandroid.simplerecyclerview.GroupAdapter.getTitleWithOrder(GroupAdapter.java:88)	at com.xdandroid.simplerecyclerview.GroupAdapter.onViewHolderBind(GroupAdapter.java:52)	at com.xdandroid.simplerecyclerview.Adapter.onBindViewHolder(Adapter.java:135)	at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5768)	at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:5801)	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5037)	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4913)	at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2029)	at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:531)	at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1377)	at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:578)	at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)	at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3260)	at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3069)	at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3518)	at android.view.View.layout(View.java:16112)	at android.view.ViewGroup.layout(ViewGroup.java:5185)	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)	at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)	at android.view.View.layout(View.java:16112)