java.lang.IndexOutOfBoundsException

Invalid index 2, size is 2

Samebug tips1

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.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web7187

  • via GitHub by kxs109
    , 8 months ago
    Invalid index 2, size is 2
  • Invalid index 2, size is 2
  • via Google Groups by Dante vd merwe, 1 week ago
    Invalid index 2, size is 2
  • Stack trace

    • 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 android.support.v4.view.ViewPager.getChildDrawingOrder(ViewPager.java:800) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2023) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2350) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2040) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2216) at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1563) at android.app.Activity.dispatchTouchEvent(Activity.java:2547) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:63) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2164) at android.view.View.dispatchPointerEvent(View.java:8003) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4221) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4100) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3658) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3712) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3681) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3792) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3689) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3849) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3658) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3712) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3681) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3689) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3658) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5925) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5874) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5845) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6005) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:138) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:5584) 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:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    9 times, 8 months ago
    Once, 7 months ago
    586 times, 9 months ago
    Once, 11 months ago
    3 times, 11 months ago
    241 more bugmates