java.lang.IndexOutOfBoundsException

Invalid index 0, size is 0


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 web7697

Solution icon of coderanch
via Coderanch by neetika porwal, 7 months ago
Invalid index 0, size is 0

Solution icon of github
via GitHub by Shern
, 1 year ago
Invalid index 0, size is 0

Solution icon of github
via GitHub by neekers
, 9 months ago
Invalid index 0, size is 0

Solution icon of github
Invalid index 0, size is 0

Solution icon of github
via GitHub by nurcahyo
, 1 year ago
Invalid index 0, size is 0

Solution icon of github
via GitHub by zibiksior
, 1 year ago
Invalid index 0, size is 0

Solution icon of github
via GitHub by tral
, 11 months ago
Invalid index 0, size is 0

Solution icon of github
via GitHub by eGorets
, 1 year ago
Invalid index 0, size is 0

Solution icon of github
via GitHub by ZangievM
, 5 months ago
Invalid index 0, size is 0


Stack trace

  • 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.cedf.PraiseActivity$MyBaseAdapter.getView(PraiseActivity.java:279) at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:232) at android.widget.AbsListView.obtainView(AbsListView.java:2820) at android.widget.ListView.makeAndAddView(ListView.java:1884) at android.widget.ListView.fillDown(ListView.java:713) at android.widget.ListView.fillFromTop(ListView.java:779) at android.widget.ListView.layoutChildren(ListView.java:1693) at android.widget.AbsListView.onLayout(AbsListView.java:2624) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556) at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1077) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556) at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556) at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:16672) at android.view.ViewGroup.layout(ViewGroup.java:5328) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2321) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2034) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1191) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6645) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777) at android.view.Choreographer.doCallbacks(Choreographer.java:590) at android.view.Choreographer.doFrame(Choreographer.java:560) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

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

3 times, 2 months ago
81 times, 2 months ago
Once, 5 months ago
4 times, 5 months ago
Once, 8 months ago
244 more bugmates