java.lang.IndexOutOfBoundsException

setSpan (0 ... 4) ends beyond length 2

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web160

  • via GitHub by teolemon
    ,
  • via GitHub by teolemon
    ,
  • Stack trace

    • 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 java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    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

    Hiren AmaliyarHiren Amaliyar
    9 times, last one
    RiyazRiyaz
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    MyInnosMyInnos
    6 times, last one
    14 more bugmates