Wherever cursor.moveToFirst () is called, it gives the cursor quota exceeded, kill it

Wherever cursor.moveToFirst () is used, it throws the following error and this only happens in

phones xiaomi

Caused by: java.lang.IllegalStateException: Process 29459 exceeded cursor quota 308, will kill it

      

and they crash. I've tried options such as closing the cursor, limiting the number of rows returned by the cursor. nothing helps.

+3


source to share


1 answer


Make sure you close the cursor like this



Cursor cursor = //yourstatement;
try {
    if (cursor.moveToFirst()){
       }
 }
} finally {
    cursor.close();
}

      

0


source







All Articles