java.lang.IndexOutOfBoundsException: setSpan (0 ... 4) ends beyond length 2

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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by teolemon
, 11 months ago
setSpan (0 ... 4) ends beyond length 2
via GitHub by teolemon
, 9 months ago
setSpan (0 ... 4) ends beyond length 2
via Stack Overflow by Jared
, 9 months ago
setSpan (13 ... 31) ends beyond length 18
via GitHub by Grunthos
, 2 years ago
setSpan (4 ... 16) ends beyond length 15
via Stack Overflow by zedix
, 2 years ago
java.lang.IndexOutOfBoundsException: setSpan (0 ... 4) ends beyond length 2
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1090)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:665)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:658)
at android.widget.TextView.setSpan_internal(TextView.java:9683)
at android.widget.Editor$SuggestionsPopupWindow.onItemClick(Editor.java:3086)
at android.widget.AdapterView.performItemClick(AdapterView.java:310)
at android.widget.AbsListView.performItemClick(AbsListView.java:1145)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3066)
at android.widget.AbsListView$3.run(AbsListView.java:3903)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Once, 1 year ago

Write tip

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