android java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow

前端 未结 2 1478
余生分开走
余生分开走 2020-11-27 20:42

I am developing an application which download some files and save their text in file_content field to database. The file sizes can vary from some KBs to 10 MB. The app works

相关标签:
2条回答
  • 2020-11-27 21:21

    01-29 13:41:56.520: W/CursorWindow(4121): Window is full: requested allocation 5140987 bytes, free space 2096617 bytes, window size 2097152 bytes

    Android SQLite returns rows in cursor windows that have the maximum size of 2MB as specified by config_cursorWindowSize. If your row exceeds this limit, you'll get this error.

    Storing large data in sqlite database is not a good idea anyway. Store files in filesystem and paths in database.

    0 讨论(0)
  • 2020-11-27 21:22

    In case you want to save images as bytes, Another way to do this is, while compressing the bitmap, set the quality to 0.

    0 讨论(0)
提交回复
热议问题