Android bug setSpan (-1 ... -1)

作者: android 发布时间: 2017-12-26 浏览: 6095 次 编辑

今天友盟上有个bug, 发生在8.0系统上的,有人遇到吗?

java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
    at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1318)
    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:684)
    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)
    at android.view.accessibility.AccessibilityNodeInfo.setText(AccessibilityNodeInfo.java:2474)
    at android.widget.TextView.onInitializeAccessibilityNodeInfoInternal(TextView.java:10614)
    at android.view.View.onInitializeAccessibilityNodeInfo(View.java:7345)
    at android.view.View.createAccessibilityNodeInfoInternal(View.java:7304)
    at android.view.View.createAccessibilityNodeInfo(View.java:7289)
    at android.view.accessibility.AccessibilityRecord.setSource(AccessibilityRecord.java:146)
    at android.view.accessibility.AccessibilityRecord.setSource(AccessibilityRecord.java:119)
    at android.view.View.onInitializeAccessibilityEventInternal(View.java:7241)
    at android.widget.TextView.onInitializeAccessibilityEventInternal(TextView.java:10595)
    at android.view.View.onInitializeAccessibilityEvent(View.java:7229)
    at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:7091)
    at android.view.View.sendAccessibilityEventUnchecked(View.java:7076)
    at android.view.View$SendViewStateChangedAccessibilityEvent.run(View.java:26260)
    at android.os.Handler.handleCallback(Handler.java:808)
    at android.os.Handler.dispatchMessage(Handler.java:101)
    at android.os.Looper.loop(Looper.java:166)
    at android.app.ActivityThread.main(ActivityThread.java:7406)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:926)