cursor错误

今天执行数据库语句的时候出现了这么一个错误

android.database.StaleDataException: Attempting to access a closed CursorWindow.Most probable cause: cursor is deactivated prior to calling this method.

大致意思是这样的

android.database.staledataexception试图访问一个封闭的cursorwindow最可能的原因光标停用调用此方法之前

目前在类中不关闭cursor和数据库连接对象即可

但是我想最好关闭,如果有大神看到求指教

 

原文地址:https://www.cnblogs.com/lingzhishitu/p/4387126.html