My App Is Working On Emulator, Not On Device. Log Cat Says Android.database.cursorindexoutofboundsexception
I am unable to find where on the database i have made a mistake. The app that i am making works on the emulator the emulator, but now that i am trying to run it on mobile device on
Solution 1:
Always use this condition when dealing with cursors:
if( cursor != null && cursor.moveToFirst() ) {
//do operations with records
}
Check whether the cursor is null or not. If it not null, then move the cursor to the first record. The cursor here is probably null (has no records).
Post a Comment for "My App Is Working On Emulator, Not On Device. Log Cat Says Android.database.cursorindexoutofboundsexception"