2017-12-31 47 views
0

Ich habe dieses java.lang.IndexOutOfBoundsException Problem und ich möchte es in meinem Code verfolgen, aber Android Studio gibt mir nicht genug Back Stack (Debug und Logcat Tabs) zu sehen, wo das Problem beginnt . Ich möchte die Größe der angezeigten Debug-Informationen erhöhen, aber ich weiß nicht, wie es geht.Erhöhe Debug (logcat?) Größe in Android Studio

Ich habe bereits die beiden hier gezeigten Methoden ausprobiert: Android Studio logcat history/buffer size aber sie scheinen nicht zu funktionieren, ich bekomme immer die gleichen Debug-Informationen.

--------- beginning of crash 
E/AndroidRuntime: FATAL EXCEPTION: main 
        Process: com.zboot.alarm1, PID: 3011 
        java.lang.IndexOutOfBoundsException: Invalid index 7, size is 7 
         at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) 
         at java.util.ArrayList.get(ArrayList.java:308) 
         at com.bignerdranch.expandablerecyclerview.Adapter.ExpandableRecyclerAdapter.getItemViewType(ExpandableRecyclerAdapter.java:233) 
         at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5631) 
         at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5563) 
         at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5559) 
         at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2229) 
         at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1556) 
         at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1516) 
         at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:608) 
         at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3693) 
         at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:3109) 
         at android.view.View.measure(View.java:18788) 
         at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:934) 
         at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:973) 
         at android.view.View.measure(View.java:18788) 
         at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) 
         at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:714) 
         at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:786) 
         at android.view.View.measure(View.java:18788) 
         at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) 
         at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 
         at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139) 
         at android.view.View.measure(View.java:18788) 
         at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) 
         at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465) 
         at android.widget.LinearLayout.measureVertical(LinearLayout.java:748) 
         at android.widget.LinearLayout.onMeasure(LinearLayout.java:630) 
         at android.view.View.measure(View.java:18788) 
         at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) 
         at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 
         at android.view.View.measure(View.java:18788) 
         at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) 
         at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465) 
         at android.widget.LinearLayout.measureVertical(LinearLayout.java:748) 
         at android.widget.LinearLayout.onMeasure(LinearLayout.java:630) 
         at android.view.View.measure(View.java:18788) 
         at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951) 
         at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) 
         at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2643) 
         at android.view.View.measure(View.java:18788) 
         at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2100) 
         at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1216) 
         at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1452) 
         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 j 

Antwort

0

Nicht die exakte Lösung, die Sie verlangen, sondern eine der besten Möglichkeiten, um die Ausnahme Trace zu erhalten.

sollten Sie melden alle Ausnahmen über Crashlytics mit:

Crashlytics.logException(e); 

die werden alle angemeldeten Ausnahmen als nicht schwerwiegende Fehler gemeldet werden.

Verwandte Themen