java.lang.IndexOutOfBoundsException: Invalid index 6, size is 1

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

,
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.

,

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

java.lang.IndexOutOfBoundsException: Invalid index 6, size is 1
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:225)
at android.widget.AbsListView.obtainView(AbsListView.java:2372)
at android.widget.ListView.makeAndAddView(ListView.java:1816)
at android.widget.ListView.fillDown(ListView.java:717)
at android.widget.ListView.fillGap(ListView.java:681)
at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5711)
at android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3466)
at android.widget.AbsListView.onTouchMove(AbsListView.java:3923)
at android.widget.AbsListView.onTouchEvent(AbsListView.java:3695)
at android.view.View.dispatchTouchEvent(View.java:7725)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2215)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1950)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2221)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2221)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2221)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2221)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2221)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2221)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2221)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2113)
at android.view.View.dispatchPointerEvent(View.java:7905)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3985)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3864)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3407)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3457)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3426)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3533)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3434)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3590)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3407)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3457)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3426)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3434)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3407)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5570)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5550)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5521)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5650)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:5623)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:5669)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:786)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:558)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:772)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5143)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 7 months ago
11 times, 11 months ago
262 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.