0

I am using listviewto store more then 50 item into the listview its working but after inserting the 20th item the erros showing in the log cat like this.

08-02 12:50:34.646: E/CursorWindow(5245): not growing since there are already 16 row(s), max size 1048576
08-02 12:50:34.646: E/Cursor(5245): Failed allocating 69485 bytes for text/blob at 24,8
08-02 12:50:34.695: D/Cursor(5245): finish_program_and_get_row_count row 25
08-02 12:50:35.365: E/CursorWindow(5245): need to grow: mSize = 1048576, size = 69485, freeSpace() = 9795, numRows = 16
08-02 12:50:35.365: E/CursorWindow(5245): not growing since there are already 16 row(s), max size 1048576
08-02 12:50:35.365: E/Cursor(5245): Failed allocating 69485 bytes for text/blob at 23,8
08-02 12:50:35.396: D/Cursor(5245): finish_program_and_get_row_count row 26
08-02 12:50:35.896: D/Cursor(5245): skip_rows row 7
08-02 12:50:35.905: E/CursorWindow(5245): need to grow: mSize = 1048576, size = 69485, 
freeSpace() = 9795, numRows = 16
08-02 12:50:35.905: E/CursorWindow(5245): not growing since there are already 16 row(s), max size 1048576
08-02 12:50:35.905: E/Cursor(5245): Failed allocating 69485 bytes for text/blob at 22,8
08-02 12:50:35.936: D/Cursor(5245): finish_program_and_get_row_count row 27
08-02 12:50:36.425: D/Cursor(5245): skip_rows row 6
08-02 12:50:36.436: E/CursorWindow(5245): need to grow: mSize = 1048576, size = 69485, 
freeSpace() = 9795, numRows = 16

and also the application is very slow to load. Help me.

4

1 に答える 1

1

Answer is, We can't load more than 1 MB data from sqlite db in single Cursor. So have to avoid loading large datas into the list item. Alternate solution keep any unique ids for the lager data and call it a single data by onClick List item(Worked for me).

And the best solution is using CursorJoiner and follow this links

how to load more than 1 MB data from sqlite db to android cursor?

Android SQL Lite fail to grow

于 2012-09-01T10:06:17.930 に答える