2016-06-12 12 views
0

Android Studio(およびIntelliJ afaik)でエラーが発生した場合、スタックトレースは特定の行数に制限されているようです。たとえば、次のようにAndroid Studioでスタックトレース全体を表示するにはどうすればよいですか?

(私はこの説明と例以下の完全なスタックトレースを掲載している。)

 **MANY MANY LINES BEFORE THIS** 
    Caused by: java.lang.reflect.InvocationTargetException 
    at java.lang.reflect.Constructor.newInstance(Native Method) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:631) 
     ... 37 

を私はフルを遮断しているもの37実際にあるが、私はこれらのエディタのように感じることを確認していませんスタックトレース。これは、私のコードでは、ヌルポインタ例外がスタックトレースを開始する問題を引き起こしていることを証明できるため、これを言います。私はこの時間を見つけるのは幸運でしたが、何らかの理由で私の問題の根本を無視しているようです。

Androidの仕組みのせいかもしれませんが、カスタムビューを展開したときにnullポインタの例外が発生し、エラーが発生していることを示す行が問題の原因ではないことを示しています。ビューは作成時にコンストラクターに問題があります。

私はこの問題が何であるかを知っていますが、この問題が発生したのは初めてではありません。デバッグは非常に困難です。

ここに私の完全なスタックトレースがあります。

06-12 12:59:31.766 31807-31807/ 
E/AndroidRuntime: FATAL EXCEPTION: main 
                       Process: , PID: 31807 
                       android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class <unknown> 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:551) 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                  at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5228) 
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4453) 
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4363) 
                        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1961) 
                        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1370) 
                        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1333) 
                        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:562) 
                        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2900) 
                        at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1418) 
                        at android.support.v7.widget.RecyclerView.access$400(RecyclerView.java:144) 
                        at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3783) 
                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920) 
                        at android.view.Choreographer.doCallbacks(Choreographer.java:695) 
                        at android.view.Choreographer.doFrame(Choreographer.java:628) 
                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) 
                        at android.os.Handler.handleCallback(Handler.java:739) 
                        at android.os.Handler.dispatchMessage(Handler.java:95) 
                        at android.os.Looper.loop(Looper.java:158) 
                        at android.app.ActivityThread.main(ActivityThread.java:7224) 
                        at java.lang.reflect.Method.invoke(Native Method) 
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                       Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown> 
                        at android.view.LayoutInflater.createView(LayoutInflater.java:657) 
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) 
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:498) 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:429)  

                        at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5228)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4453)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4363)  
                        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1961)  
                        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1370)  
                        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1333)  
                        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:562)  
                        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2900)  
                        at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1418)  
                        at android.support.v7.widget.RecyclerView.access$400(RecyclerView.java:144)  
                        at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3783)  
                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)  
                        at android.view.Choreographer.doCallbacks(Choreographer.java:695)  
                        at android.view.Choreographer.doFrame(Choreographer.java:628)  
                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)  
                        at android.os.Handler.handleCallback(Handler.java:739)  
                        at android.os.Handler.dispatchMessage(Handler.java:95)  
                        at android.os.Looper.loop(Looper.java:158)  
                        at android.app.ActivityThread.main(ActivityThread.java:7224)  
                        at java.lang.reflect.Method.invoke(Native Method)  
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)  
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)  
                       Caused by: java.lang.reflect.InvocationTargetException 
                        at java.lang.reflect.Constructor.newInstance(Native Method) 
                        at android.view.LayoutInflater.createView(LayoutInflater.java:631) 
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)  
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)  
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:498)  
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:429)  
                                            at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5228)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4453)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4363)  
                        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1961)  
                        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1370)  
                        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1333)  
                        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:562)  
                        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2900)  
                        at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1418)  
                        at android.support.v7.widget.RecyclerView.access$400(RecyclerView.java:144)  
                        at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3783)  
                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)  
                        at android.view.Choreographer.doCallbacks(Choreographer.java:695)  
                        at android.view.Choreographer.doFrame(Choreographer.java:628)  
                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)  
                        at android.os.Handler.handleCallback(Handler.java:739)  
                        at android.os.Handler.dispatchMessage(Handler.java:95)  
                        at android.os.Looper.loop(Looper.java:158)  
                        at android.app.ActivityThread.main(ActivityThread.java:7224)  
                        at java.lang.reflect.Method.invoke(Native Method)  
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)  
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)  
                       Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class 
                 at android.view.LayoutInflater.inflate(LayoutInflater.java:551) 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:380) 
                        at com.subliroid.subliroidlib.customviews.InfoHeaderCard.init(InfoHeaderCard.java:47) 
                        at com.subliroid.subliroidlib.customviews.InfoHeaderCard.<init>(InfoHeaderCard.java:23) 
                        at java.lang.reflect.Constructor.newInstance(Native Method)  
                        at android.view.LayoutInflater.createView(LayoutInflater.java:631)  
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)  
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)  
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:498)  
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:429)  
                    at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5228)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4453)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4363)  
                        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1961)  
                        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1370)  
                        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1333)  
                        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:562)  
                        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2900)  
                        at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1418)  
                        at android.support.v7.widget.RecyclerView.access$400(RecyclerView.java:144)  
                        at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3783)  
                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)  
                        at android.view.Choreographer.doCallbacks(Choreographer.java:695)  
                        at android.view.Choreographer.doFrame(Choreographer.java:628)  
                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)  
                        at android.os.Handler.handleCallback(Handler.java:739)  
                        at android.os.Handler.dispatchMessage(Handler.java:95)  
                        at android.os.Looper.loop(Looper.java:158)  
                        at android.app.ActivityThread.main(ActivityThread.java:7224)  
                        at java.lang.reflect.Method.invoke(Native Method)  
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)  
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)  
                       Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class 
                   at android.view.LayoutInflater.createView(LayoutInflater.java:657) 
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) 
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:498) 
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:429)  
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:380)  
                        at com.subliroid.subliroidlib.customviews.InfoHeaderCard.init(InfoHeaderCard.java:47)  
                        at com.subliroid.subliroidlib.customviews.InfoHeaderCard.<init>(InfoHeaderCard.java:23)  
                        at java.lang.reflect.Constructor.newInstance(Native Method)  
                        at android.view.LayoutInflater.createView(LayoutInflater.java:631)  
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)  
                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)  
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:498)  
                        at android.view.LayoutInflater.inflate(LayoutInflater.java:429)   
                        at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5228)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4453)  
                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4363)  
                        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1961)  
                        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1370)  
                        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1333)  
                        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:562)  
                        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2900)  
                        at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1418)  
                        at android.support.v7.widget.RecyclerView.access$400(RecyclerView.java:144)  
                        at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3783)  
                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)  
                        at android.view.Choreographer.doCallbacks(Choreographer.java:695)  
                        at android.view.Choreographer.doFrame(Choreographer.java:628)  
                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)  
                        at android.os.Handler.handleCallback(Handler.java:739)  
                        at android.os.Handler.dispatchMessage(Handler.java:95)  
                        at android.os.Looper.loop(Looper.java:158)  
                        at android.app.ActivityThread.main(ActivityThread.java:7224)  
                        at java.lang.reflect.Method.invoke(Native Method)  
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)  
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)  
                       Caused by: java.lang.reflect.InvocationTargetException 
                        at java.lang.reflect.Constructor.newInstance(Native Method) 
                        at android.view.LayoutInflater.createView(LayoutInflater.java:631) 
                        ... 37 

インデントのため申し訳ありませんが、コピー&ペーストは、エディタから完璧ではありません、私は非常に私の仕事を重視するので完璧ではありません、と私はいくつかの行を省略したかった:)。私がカットするすべてのラインは、ライン上で異なるインデントを持ち、ラインはすべて同じクラスを参照して削除されます。

答えて

0

ACRAを使用すると、完全なスタックトレースを確認できます

関連する問題