无法从ACRA报告中找到错误

时间:2011-09-01 11:24:21

标签: android logging stack-trace

我开始在我的Android项目中使用ACRA,但文档中有一个我无法重现的错误,也没有找到它来自哪里,这就是stackTrace:

java.lang.IndexOutOfBoundsException: charAt: -2 < 0
    at android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java:110)
    at android.text.TextUtils.getCapsMode(TextUtils.java:1573)
    at android.view.inputmethod.BaseInputConnection.getCursorCapsMode(BaseInputConnection.java:273)
    at android.widget.TextView.onCreateInputConnection(TextView.java:4492)
    at android.view.inputmethod.InputMethodManager.startInputInner(InputMethodManager.java:942)
    at android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.java:1114)
    at android.view.inputmethod.InputMethodManager.isActive(InputMethodManager.java:539)
    at android.widget.TextView.onDraw(TextView.java:4020)
    at android.view.View.draw(View.java:6535)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1529)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
    at android.view.View.draw(View.java:6538)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
    at android.view.View.draw(View.java:6641)
    at android.widget.FrameLayout.draw(FrameLayout.java:352)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
    at android.view.View.draw(View.java:6538)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
    at android.view.View.draw(View.java:6538)
    at android.widget.FrameLayout.draw(FrameLayout.java:352)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
    at android.view.View.draw(View.java:6538)
    at android.widget.FrameLayout.draw(FrameLayout.java:352)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1830)
    at android.view.ViewRoot.draw(ViewRoot.java:1349)
    at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4363)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    at dalvik.system.NativeStart.main(Native Method)

任何想法是什么造成的?我甚至不知道Activity创造了什么。我报告了33个错误,可能有一半是错误。

编辑:布局

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
    android:layout_height="fill_parent" android:layout_width="fill_parent"
    style="@style/background">
    ...
    <include android:id="@+id/notifications" android:layout_width="fill_parent" android:layout_height="wrap_content" layout="@layout/notifications"/>
</FrameLayout>

和通知布局:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="fill_parent" android:layout_height="fill_parent" 
          android:id="@+id/frameLayout" android:layout_gravity="bottom">

 <SlidingDrawer android:id="@+id/slideNotifications" android:orientation="vertical"
             android:handle="@+id/handle" android:content="@+id/content"
             android:layout_height="wrap_content" android:layout_width="fill_parent">

    <RelativeLayout android:id="@id/handle"
                android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:background="@drawable/slide_handler">
    ...
    </RelativeLayout>
 <LinearLayout android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:id="@id/content"
            android:orientation="vertical" 
            android:background="@color/bgWeb">
     ...
 </LinearLayout>
 </SlidingDrawer>
</FrameLayout>

1 个答案:

答案 0 :(得分:0)

由于@Dave评论

,我找到了错误的类

在我的活动中添加 putCustomData