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


Samebug tips

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.


7 months ago
Expert tip

Solutions on the web

Solution icon of stackoverflow
Invalid index 2, size is 2

Solution icon of github
Invalid index 2, size is 2

Solution icon of github
Invalid index 2, size is 2

Solution icon of github
Invalid index 2, size is 2

Solution icon of github
Invalid index 2, size is 2

Solution icon of github
Invalid index 2, size is 2

Solution icon of googlegroups
via Google Groups by milord.me, 4 months ago
Invalid index 2, size is 2

Solution icon of stackoverflow
Invalid index 2, size is 2

Solution icon of stackoverflow
Invalid index 2, size is 2

Solution icon of stackoverflow
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 pet.com.br.pet.chat.ChatViewActivity.parseData(ChatViewActivity.java:165)

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

Once, 9 months ago
586 times, 1 year ago
Once, 1 year ago
3 times, 1 year ago
Once, 1 year ago
256 more bugmates