我在android中得到以下錯誤消息。如何在Android中避免此消息
終結尚未停用或關閉的遊標。 database = /data/data/com.example.Recipie/databases/recipedbase.db,table = recipes,query = SELECT DISTINCT title FROM recipes WHERE title =「Mysore Pa」 android.database.sqlite.DatabaseObjectNotClosedException:應用程序未關閉在這裏打開的遊標或數據庫對象 at android.database.sqlite.SQLiteCursor。(SQLiteCursor.java:210)
我已將此代碼添加到我的代碼中。但我也收到上述消息。請幫助。 :)
@Override
protected void onDestroy()
{
super.onDestroy();
rDbHelper.close();
}
我應該關閉我用過的所有遊標嗎? – 2010-08-16 14:45:04
是的 - 因爲消息是這樣說的;) – ZeissS 2010-08-16 14:55:52