java.lang.IndexOutOfBoundsException

setSpan (21 ... 21) ends beyond length 2


Solutions on the web1160

Solution icon of github
setSpan (21 ... 21) ends beyond length 2

Solution icon of web
via twittercommunity.com by Unknown author, 8 months ago
setSpan (21 ... 21) ends beyond length 11

Solution icon of stackoverflow
setSpan (21 ... 21) ends beyond length 11

Solution icon of stackoverflow
setSpan (21 ... 21) ends beyond length 11

Solution icon of web
via mozilla.com by Unknown author, 7 months ago
setSpan (2 ... 2) ends beyond length 1

Solution icon of stackoverflow
setSpan (2 ... 2) ends beyond length 0

Solution icon of web
setSpan (2 ... 2) ends beyond length 0

Solution icon of github
via GitHub by samvgorode
, 3 days ago
setSpan (2 ... 2) ends beyond length 0

Solution icon of stackoverflow
setSpan (2 ... 2) ends beyond length 0

Stack trace

  • java.lang.IndexOutOfBoundsException: setSpan (21 ... 21) ends beyond length 2 at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:945) at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:527) at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:520) at android.widget.SpellChecker$SpellParser.init(SpellChecker.java:403) at android.widget.SpellChecker.spellCheck(SpellChecker.java:224) at android.widget.TextView.updateSpellCheckSpans(TextView.java:7810) at android.widget.TextView.sendOnTextChanged(TextView.java:7638) at android.widget.TextView.handleTextChanged(TextView.java:7681) at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:8044) at android.text.SpannableStringBuilder.sendTextChange(SpannableStringBuilder.java:892) at android.text.SpannableStringBuilder.change(SpannableStringBuilder.java:389) at android.text.SpannableStringBuilder.change(SpannableStringBuilder.java:266) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:443) at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:216) at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:29) at android.text.method.BaseKeyListener.backspaceOrForwardDelete(BaseKeyListener.java:90) at android.text.method.BaseKeyListener.backspace(BaseKeyListener.java:45) at android.text.method.BaseKeyListener.onKeyDown(BaseKeyListener.java:151) at android.text.method.QwertyKeyListener.onKeyDown(QwertyKeyListener.java:352) at android.text.method.TextKeyListener.onKeyDown(TextKeyListener.java:132) at android.widget.TextView.doKeyDown(TextView.java:5445) at android.widget.TextView.onKeyDown(TextView.java:5267) at android.widget.AutoCompleteTextView.onKeyDown(AutoCompleteTextView.java:682) at android.view.KeyEvent.dispatch(KeyEvent.java:2551) at android.view.View.dispatchKeyEvent(View.java:5500) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246) at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:344) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1246) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1879) at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1361) at android.app.Activity.dispatchKeyEvent(Activity.java:2324) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1806) at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3327) at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2597) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method)

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

Once, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
9 more bugmates