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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -