java.lang.RuntimeException

Unable to start activity ComponentInfo{com.example.jdw.v52/com.wimso.v052.MainActivity}: 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.


rafaelrafael

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

Solutions on the web4266

  • via Stack Overflow by AJW
    ,
  • via GitHub by mattjohnpowell
    ,
  • via GitHub by Ckozoh
    ,
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.jdw.v52/com.wimso.v052.MainActivity}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) at android.app.ActivityThread.access$600(ActivityThread.java:130) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251) at java.util.ArrayList.get(ArrayList.java:304) at com.wimso.v052.adapter.ContactListAdapter.getItem(ContactListAdapter.java:95) at com.wimso.v052.adapter.ContactListAdapter.clear(ContactListAdapter.java:72) at com.wimso.v052.MainActivity.loadData(MainActivity.java:171) at com.wimso.v052.MainActivity.onStart(MainActivity.java:126)

    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

    MacaponMacapon
    6 times, last one
    szosziszoszi
    2 times, last one
    LartenLarten
    Once,
    Unknown visitor
    Unknown visitorOnce,
    winer222winer222
    3 times, last one
    241 more bugmates