我遇到了跨越Android的SQLite数据库大小的问题。
我做所有的开盘和收盘操作;我用Singleton;我似乎得到一个Cursor关闭错误;但我不明白我目前在哪里犯了错误。
CursorWindow: Could not allocate CursorWindow 'db path' of size 2097152 due to error -24.
AsyncQuery: Exception thrown during handling EVENT_ARG_QUERY
android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=963 (# cursors opened by this proc=963)
at android.database.CursorWindow.<init>(CursorWindow.java:108)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:138)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
at android.content.ContentResolver.query(ContentResolver.java:773)
at android.content.ContentResolver.query(ContentResolver.java:704)
at android.content.ContentResolver.query(ContentResolver.java:662)
at android.content.AsyncQueryHandler$WorkerHandler.handleMessage(AsyncQueryHandler.java:79)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)