android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed -
i know it's old question, don't find solution issue android.database.cursorwindowallocationexception: cursor window allocation of 2048 kb failed.
here code:
public synchronized string gettype(string suffix) { string basicsuffix = suffix.tolowercase(); string countquery = sql_select_all + table_type + sql_where + key_type_suffix + " =? "; cursor cursor = null; string type = ""; try { sqlitedatabase db = this.getreadabledatabase(); cursor = db.rawquery(countquery, new string[]{basicsuffix}); if (cursor != null) { cursor.movetofirst(); if (cursor.getcount() > 0 && cursor.getstring(1) != null) { type = cursor.getstring(1); } else { type = file_type_unknown; } } else { type = file_type_unknown; } } { if (cursor != null) { cursor.close(); } } return type; }
log informs error occurred in line code cursor.movetofirst();
thank you.
Comments
Post a Comment