Thursday, May 31, 2012

[android-developers] Re: Strange StringIndexOutOfBoundsException with TextView(stacktrace contains supportTabandEmoji)

So maybe the TextView is modified by manufacturer.


RichardC於 2012年6月1日星期五UTC+8上午2時03分08秒寫道:
Going down your stack trace, the first method I can't find in the source is TextView.onMeasure2 and searching Google for "TextView.onMeasure2" (without the "") turns up some hits that look like they are from China.

On Thursday, May 31, 2012 6:51:43 PM UTC+1, koji wrote:

My application 's error log in google play shows many StringIndexOutOfBoundsException.
I want to find the root cause, but it's really hard for me. Because it happens at render time.
So there is not any my method in stacktrace.  

my stacktrace looks like this.

        at java.lang.String.getChars(
        at android.text.SpannableStringInternal.getChars(
        at android.text.TextUtils.getChars(
        at android.text.Layout.processToSupportEmoji(
        at android.text.Layout.supportTabandEmoji(
        at android.text.Layout.measureText2(
        at android.text.Layout.getDesiredWidth2(
        at android.text.Layout.getDesiredWidth2(
        at android.widget.TextView.onMeasure2(
        at android.widget.TextView.onMeasure(
        at android.view.View.measure(
        at android.view.ViewGroup.measureChildWithMargins(
        at android.widget.LinearLayout.measureChildBeforeLayout(
        at android.widget.LinearLayout.measureHorizontal(
        at android.widget.LinearLayout.onMeasure(
        at android.view.View.measure( 

And I can't find supportTabandEmoji in android git repository.
My TextView's content sometimes has some ImageSpan, but it depends on use's input, so I don't know what textview set actually.

Did some one see this error before? And is there any work around for this problem?



You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment