java.lang.StringIndexOutOfBoundsException: length=4; regionStart=0; regionLength=-1

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

,
via GitHub by Omertron

You need to make sure that capitalisation of the case for the plugin in the properties file is exactly: "AllocinePlugin" and not "allocineplugin"

,
Expert tip

This is a bug when using Micromax devices with VideoView. You can either exclude these devices or look at this workaround: http://stackoverflow.com/a/31942841/4347859

Solutions on the web

via GitHub by door43app
, 2 years ago
length=87; regionStart=7; regionLength=-5
via GitHub by door43app
, 2 years ago
length=193; regionStart=92; regionLength=-76
via GitHub by door43app
, 2 years ago
length=193; regionStart=92; regionLength=-76
via GitHub by door43app
, 2 years ago
length=87; regionStart=7; regionLength=-5
via GitHub by liaolintao
, 6 months ago
length=8; regionStart=5; regionLength=-2
java.lang.StringIndexOutOfBoundsException: length=4; regionStart=0; regionLength=-1
at java.lang.String.startEndAndLength(String.java:504)
at java.lang.String.substring(String.java:1333)
at com.example.android.test_app.MainActivity.displayTimeReal(MainActivity.java:91)
at com.example.android.test_app.MainActivity.access$200(MainActivity.java:12)
at com.example.android.test_app.MainActivity$1.onClick(MainActivity.java:31)
at android.view.View.performClick(View.java)
at android.view.View$PerformClick.run(View.java)
at android.os.Handler.handleCallback(Handler.java)
at android.os.Handler.dispatchMessage(Handler.java)
at android.os.Looper.loop(Looper.java)
at android.app.ActivityThread.main(ActivityThread.java)
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)

Users with the same issue

59 times, 1 month ago
Once, 4 months ago
36 times, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
109 more bugmates

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