当前位置:  开发笔记 > 编程语言 > 正文

如何调试Android java.lang.IndexOutOfBoundsException HeaderViewListAdapter.java行

如何解决《如何调试Androidjava.lang.IndexOutOfBoundsExceptionHeaderViewListAdapter.java行》经验,为你挑选了0个好方法。

我有一个生活在android playstore中的应用程序,最近我在这里开始查看来自Crashlytics的崩溃报告,其中包含以下跟踪信息:

Fatal Exception: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
   at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
   at java.util.ArrayList.get(ArrayList.java:304)
   at android.widget.HeaderViewListAdapter.isEnabled(HeaderViewListAdapter.java:164)
   at android.widget.ListView.dispatchDraw(ListView.java:3259)
   at android.view.View.draw(View.java:14183)
   at android.widget.AbsListView.draw(AbsListView.java:4960)
   at android.view.View.getDisplayList(View.java:13118)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.draw(View.java:14183)
   at android.widget.FrameLayout.draw(FrameLayout.java:467)
   at android.view.View.getDisplayList(View.java:13118)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.getDisplayList(View.java:13116)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1229)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.draw(View.java:14183)
   at android.view.View.getDisplayList(View.java:13118)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.draw(View.java:14183)
   at android.widget.FrameLayout.draw(FrameLayout.java:467)
   at android.view.View.getDisplayList(View.java:13118)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.draw(View.java:14183)
   at android.support.v7.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:500)
   at android.view.View.getDisplayList(View.java:13118)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.getDisplayList(View.java:13116)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.getDisplayList(View.java:13116)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.View.draw(View.java:13896)
   at android.view.ViewGroup.drawChild(ViewGroup.java:3024)
   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2893)
   at android.view.View.draw(View.java:14183)
   at android.widget.FrameLayout.draw(FrameLayout.java:467)
   at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2449)
   at android.view.View.getDisplayList(View.java:13118)
   at android.view.View.getDisplayList(View.java:13162)
   at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1198)
   at android.view.ViewRootImpl.draw(ViewRootImpl.java:2431)
   at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2303)
   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2109)
   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1179)
   at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4859)
   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
   at android.view.Choreographer.doCallbacks(Choreographer.java:562)
   at android.view.Choreographer.doFrame(Choreographer.java:532)
   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
   at android.os.Handler.handleCallback(Handler.java:725)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:5328)
   at java.lang.reflect.Method.invokeNative(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
   at dalvik.system.NativeStart.main(NativeStart.java)

我的应用程序有很多屏幕和视图,从此跟踪来看,没有任何帧来自我的应用程序:(我如何找出从哪里开始看?对此非常感谢。

推荐阅读
李桂平2402851397
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有