Cursor finalized without prior close() Android
问题 In my application I have a listview. I get my data with a query from a SQLiteDatabase. When I get the data from the db I get this error: It occurs when I go from line 20 to 21. I tried placing cursor.deactivate() and cursor.close() on regel 50. But with no result. Anyone knows why I get this error and how to solve it? Thanks :) 回答1: You have to close the cursor before the database. Put your code in a try / catch block and in a finally block, close the cursor and then close the database: try {