有人可以告诉我这个`StaleDataException`吗 [英] Can someone explain to me this `StaleDataException`
本文介绍了有人可以告诉我这个`StaleDataException`吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以向我解释这个 StaleDataException
Can someone explain to me this StaleDataException
07-11 19:58:23.298 E/AndroidRuntime( 1044): Uncaught handler: thread main exiting due to uncaught exception
07-11 19:58:23.368 E/AndroidRuntime( 1044): android.database.StaleDataException: Access closed cursor
07-11 19:58:23.368 E/AndroidRuntime( 1044): at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:217)
07-11 19:58:23.368 E/AndroidRuntime( 1044): at android.database.AbstractWindowedCursor.getInt(AbstractWindowedCursor.java:84)
07-11 19:58:23.368 E/AndroidRuntime( 1044): at android.database.CursorWrapper.getInt(CursorWrapper.java:128)
我们何时以及如何需要确保对游标的查询,以及为什么这样做失败
When and how do we need to assure a requiry on the cursor, and why fails with this Exception?
推荐答案
您正试图从光标
检索信息,已经关闭了。您必须使用 isClosed
方法。
You are trying to retrieve information from a Cursor
that has already been closed. You must verify whether the cursor is closed or not by using the isClosed
method.
这篇关于有人可以告诉我这个`StaleDataException`吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文