开发者

How to avoid DatabaseObjectNotClosedException?

01-24 12:17:10.780: ERROR/Database(462): close() was never explicitly called on database '/data/data/com.test/databases/testdb7.db'

01-开发者_运维百科24 12:17:10.780: ERROR/Database(462): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here


I resolved the exception. I was calling

 db = eventsData.getReadableDatabase(); 

twice thats why the exception is thrown


You must close your cursors.

You will find similar question here: databaseobjectnotclosedexception-how-can-we-avoid-this-exception also here: how-to-avoid-this-message-in-android

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜