空指针Ex.由 NullPointerEx 引起。由 NullPointerEx 引起
我尝试运行我的 Android 应用程序时遇到这个奇怪的异常。我正在使用普通的 Activity 类,并且我已经成功地使 ListView 正常工作。我已将 onClickListerner 添加到列表项中。我在不同场合多次收到此错误消息。
为什么异常会被链接起来?
cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
detailMessage null
stackState (id=830007824008)
stackTrace null
.....
I get this weird exception I try to run my Android application. I'm using a normal Activity-class and I've managed to get a ListView up a working. I've added a onClickListerner to the listitems. I've got this error message several times on various occasions.
Why are the exceptions chained?
cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
-> cause NullPointerException (id=830007823976)
detailMessage null
stackState (id=830007824008)
stackTrace null
.....
请注意,ID 都是相同的 - 非链式异常本身就是原因。这里只有一个
NullPointerException
,因此您的任务是找到取消引用 null 值的行,以及它是如何到达那里的。Note that the IDs are all the same - non-chained exceptions have themselves as the cause. There is only one
NullPointerException
here, so your task is to find the line where a null value is being dereferenced, and how it got there.