java.lang.RuntimeException

Unable to start activity ComponentInfo{ir.homa/ir.homa.HotelPageAdapter}: 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 web43033

  • Unable to start activity ComponentInfo{ir.homa/ir.homa.HotelPageAdapter}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
  • via GitHub by door43app
    , 1 year ago
    Unable to start activity ComponentInfo{com.translationstudio.androidapp/com.door43.translationstudio.library.ProjectLibraryDetailActivity}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
  • via GitHub by JasonHezz
    , 8 months ago
    Unable to start activity ComponentInfo{com.lzy.imagepicker.ui.ImageGridActivity}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{ir.homa/ir.homa.HotelPageAdapter}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723) at android.app.ActivityThread.access$900(ActivityThread.java:172) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5832) 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:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) Caused by: 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 ir.homa.HotelPageAdapter.prepareHotels(HotelPageAdapter.java:100) at ir.homa.HotelPageAdapter.onCreate(HotelPageAdapter.java:61) at android.app.Activity.performCreate(Activity.java:6221) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611)

    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, 1 month ago
    81 times, 1 month ago
    Once, 4 months ago
    4 times, 5 months ago
    Once, 7 months ago
    241 more bugmates