java.lang.IndexOutOfBoundsException: setSpan (21 ... 21) 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

Solutions on the web

via GitHub by GoogleCodeExporter
, 9 months ago
setSpan (21 ... 21) ends beyond length 2
via google.com by Unknown author, 2 years ago
setSpan (8 ... 10) ends beyond length 8
via GitHub by GoogleCodeExporter
, 2 years ago
setSpan (23 ... 23) ends beyond length 4
via GitHub by GoogleCodeExporter
, 1 year ago
setSpan (5 ... 6) ends beyond length 0
via Xamarin Bugzilla by prashant, 1 year ago
via GitHub by door43app
, 1 year ago
setSpan (159 ... 159) ends beyond length 158
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 com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1879)
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)

Users with the same issue

Once, 10 months 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
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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