android-当我不知道哪一行出错时如何找到错误

时间:2014-12-06 06:32:02

标签: android

我在我的应用程序上登录。我在不同的设备和API上经常遇到这个错误。

这是日志:

STACK_TRACE = java.lang.IndexOutOfBoundsException: Invalid index 81, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at android.widget.HeaderViewListAdapter.isEnabled(HeaderViewListAdapter.java:164)
at android.widget.AbsListView.onTouchDown(AbsListView.java:3695)
at android.widget.AbsListView.onTouchEvent(AbsListView.java:3579)
at android.view.View.dispatchTouchEvent(View.java:7714)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2224)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2230)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1931)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2151)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1596)
at android.app.Activity.dispatchTouchEvent(Activity.java:2502)
at android.support.v7.app.ActionBarActivityDelegateICS$WindowCallbackWrapper.dispatchTouchEvent(ActionBarActivityDelegateICS.java:268)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2099)
at android.view.View.dispatchPointerEvent(View.java:7894)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4124)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4003)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3499)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3575)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3632)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3499)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5819)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5799)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5770)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5935)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:138)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)

它没有说明问题出在哪里,哪个活动和哪一行。我的主要活动是大约3000行。

无论如何我能找到这个错误吗?什么可能导致此错误?

0 个答案:

没有答案