IllegalStateException Cursor Error
Sorry for the repeat Question.but I try to make many way doesn't work In applecation,In the first round, it can push through Activity. But back then it was a mistake. SQLiteDatabas
Solution 1:
Check the return value of
if (!mCursor.moveToFirst()) {
Log.e(TAG, "Couldn't move to first");
// do something here if move failed
}
which you are ignoring now and tells you whether the move succeeded.
Solution 2:
Fix:
Try to position cursor by moveToFirst before reading data from it.
Close the cursor after if ( c.moveToFirst()) {}
check for null.e,g; if (c != null && c.moveToFirst()) {}
check for count.e,g; (c != null && c.getCount() >0 && c.moveToFirst()){}
Post a Comment for "IllegalStateException Cursor Error"