截断的Logcat异常消息

时间:2016-04-26 07:53:28

标签: android firebase logcat firebase-realtime-database

我正在尝试调试一个Android应用程序错误(在AS2.1beta3中)但是logcat消息似乎被截断了,它会给我关于导致问题的原因的信息。

错误讯息:

com.firebase.client.FirebaseException: Failed to bounce to type
    at com.firebase.client.DataSnapshot.getValue(DataSnapshot.java:185)
    at com.firebase.ui.FirebaseListAdapter.parseSnapshot(FirebaseListAdapter.java:127)
    at com.firebase.ui.FirebaseListAdapter.getItem(FirebaseListAdapter.java:116)
    at com.firebase.ui.FirebaseListAdapter.getView(FirebaseListAdapter.java:144)
    at android.widget.AbsListView.obtainView(AbsListView.java:2346)
    at android.widget.ListView.makeAndAddView(ListView.java:1875)
    at android.widget.ListView.fillDown(ListView.java:702)
    at android.widget.ListView.fillFromTop(ListView.java:763)
    at android.widget.ListView.layoutChildren(ListView.java:1670)
    at android.widget.AbsListView.onLayout(AbsListView.java:2148)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:122)
    at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
    at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1170)
    at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:814)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
    at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
    at android.view.View.layout(View.java:16630)
    at android.view.ViewGroup.layout(ViewGroup.java:5437)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2171)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
    at android.view.Choreographer.doCallbacks(Choreographer.java:670)
    at android.view.Choreographer.doFrame(Choreographer.java:606)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: com.fasterxml

有时它会在结束时显示额外的期间,即 com.fasterxml.

如何查看整条信息?这让我疯了!

1 个答案:

答案 0 :(得分:4)

我不知道如何使错误消息看起来完全出现在logcat中,但我的方法是调试应用程序并在com.firebase.client.FirebaseException上启用异常断点。

在Android Studio中打开菜单运行 - > 查看断点 - >加号 - > 3。 Java异常断点 - >粘贴com.firebase.client.FirebaseException并按OK。

现在,如果发生异常,应用程序将停止,您有时间查看异常,包括调试器中的完整堆栈跟踪。