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.example.saroosh.masjidnow.Tabs.AddMasjid$1.onClick(AddMasjid.java:61) at android.view.View.performClick(View.java:5184) at android.view.View$PerformClick.run(View.java:20910) 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:1389)

Stack Overflow | Nabia Saroosh | 6 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Error java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 in fragment by viewPager

    Stack Overflow | 6 months ago | Nabia Saroosh
    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.example.saroosh.masjidnow.Tabs.AddMasjid$1.onClick(AddMasjid.java:61) at android.view.View.performClick(View.java:5184) at android.view.View$PerformClick.run(View.java:20910) 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:1389)

  1. jk 1 times, last 9 months ago

Root Cause Analysis

  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.example.saroosh.masjidnow.Tabs.AddMasjid$1.onClick(AddMasjid.java:61) at android.view.View.performClick(View.java:5184) at android.view.View$PerformClick.run(View.java:20910) 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:1389)

    at com.android.internal.os.ZygoteInit.main()
  2. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1184)
    1 frame