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

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

via google.com by Unknown author, 1 year ago
Invalid index 6, size is 0
via GitHub by mtrakal
, 1 year ago
Invalid index 118, size is 1
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.pnminh.dfytask.adapter.ExpandableListAdapter.getChildrenCount(ExpandableListAdapter.java:94)
at com.diegocarloslima.fgelv.lib.WrapperExpandableListAdapter.getChildrenCount(WrapperExpandableListAdapter.java:49)
at com.diegocarloslima.fgelv.lib.FloatingGroupExpandableListView.drawFloatingGroupIndicator(FloatingGroupExpandableListView.java:446)
at com.diegocarloslima.fgelv.lib.FloatingGroupExpandableListView.dispatchDraw(FloatingGroupExpandableListView.java:171)
at android.view.View.draw(View.java:14856)
at android.widget.AbsListView.draw(AbsListView.java:5051)
at android.view.View.getDisplayList(View.java:13744)
at android.view.View.getDisplayList(View.java:13786)
at android.view.View.draw(View.java:14563)
at android.view.ViewGroup.drawChild(ViewGroup.java:3316)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3153)
at android.view.View.draw(View.java:14856)
at android.view.View.getDisplayList(View.java:13744)
at android.view.View.getDisplayList(View.java:13786)
at android.view.View.draw(View.java:14563)
at android.view.ViewGroup.drawChild(ViewGroup.java:3316)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3153)
at android.view.View.getDisplayList(View.java:13739)
at android.view.View.getDisplayList(View.java:13786)
at android.view.View.draw(View.java:14563)
at android.view.ViewGroup.drawChild(ViewGroup.java:3316)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3153)
at android.view.View.draw(View.java:14856)
at android.view.View.getDisplayList(View.java:13744)
at android.view.View.getDisplayList(View.java:13786)
at android.view.View.draw(View.java:14563)
at android.view.ViewGroup.drawChild(ViewGroup.java:3316)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3153)
at android.view.View.getDisplayList(View.java:13739)
at android.view.View.getDisplayList(View.java:13786)
at android.view.View.draw(View.java:14563)
at android.view.ViewGroup.drawChild(ViewGroup.java:3316)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3153)
at android.view.View.getDisplayList(View.java:13739)
at android.view.View.getDisplayList(View.java:13786)
at android.view.View.draw(View.java:14563)
at android.view.ViewGroup.drawChild(ViewGroup.java:3316)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3153)
at android.view.View.draw(View.java:14856)
at android.widget.FrameLayout.draw(FrameLayout.java:467)
at android.view.View.getDisplayList(View.java:13744)
at android.view.View.getDisplayList(View.java:13786)
at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1411)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1359)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2677)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2541)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2156)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1251)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6379)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:561)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5493)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)

Users with the same issue

4 times, 1 month ago
3 times, 5 months ago
81 times, 5 months ago
Once, 8 months ago
4 times, 9 months ago

Write tip

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