问题描述
我得到的android下面的错误消息。
定稿尚未停用或关闭游标。数据库= /data/data/com.example.Recipie/databases/recipedbase.db,表=食谱,查询= SELECT DISTINCT标题从食谱WHERE标题=迈索尔霸android.database.sqlite.DatabaseObjectNotClosedException:应用程序没有关闭在这里打开的游标或数据库对象在android.database.sqlite.SQLiteCursor(SQLiteCursor.java:210)
我在code补充这一点。而且我得到了上述消息。请帮助。 :)
@覆盖
保护无效的onDestroy()
{
super.onDestroy();
rDbHelper.close();
}
您必须关闭游标。
I get the below error message in android.
Finalizing a Cursor that has not been deactivated or closed. 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: Application did not close the cursor or database object that was opened hereat android.database.sqlite.SQLiteCursor.(SQLiteCursor.java:210)
I have added this in my code. But Also i get the above message. Kindly help. :)
@Override
protected void onDestroy()
{
super.onDestroy();
rDbHelper.close();
}
You must close your cursors.
这篇关于如何避免在Android的这条消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!