Invalid statement in fillWindow()

2019-08-08 07:17发布

Am I missing a close()?

Ok, I have an error on my emulator, but it doesn't force close. It's a cursor Invalid Starement in fillWindow() with a PID of 651. I know it has to do wih my database cursor. My ListView is filled by startManagingCursor(c), but I'm not sure If I need to close it, I'm not using a managed query.

In my onCreate I have

db = new DBase(this);
db.open();
fillData();
db.close();

and in my onResume I have

db.open();
fillData();
db.close();

I've tried putting db.close(); in my onDestroy and it still throws that error.

1条回答
够拽才男人
2楼-- · 2019-08-08 07:52

onCreate

db = new DBase(this);
db.open();
fillData();

onResume

fillData();

onDestroy

db.close();

worked.

查看更多
登录 后发表回答