If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.

You have an empty cursor. Check your query if it is not expected, or handle empty cursor with `if(cursor.getCount() > 0) ...`


When you get a Cursor returned from the database you should do an moveToFirst(); before trying to get data from it.


You need to make sure that there is a data in the cursor. Check that moveToFirst() return true.


You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Phone type and Email type not working?
    via Stack Overflow by Beginner
  • 안드로이드사이드
    via by Unknown author,
  • App crashes on incoming SMS
    via GitHub by di72nn
  • Getting RawContact id using Contact id
    via Stack Overflow by vamsiampolu
  • Strange error at super.onStart();
    via Stack Overflow by José Mª
    • android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 10 at android.database.AbstractCursor.checkPosition( at android.database.AbstractWindowedCursor.checkPosition( at android.database.AbstractWindowedCursor.getInt( at android.database.CursorWrapper.getInt( at org.tomdroid.ui.Tomdroid.showNoteInPane( at org.tomdroid.ui.Tomdroid.onConfigurationChanged( at at at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke( at$ at at dalvik.system.NativeStart.main(Native Method)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    2 times, last one,
    9 times, last one,
    Unknown visitor
    Unknown visitor2 times, last one,
    Indri YunitaIndri Yunita
    1 times, last one,
    51 more bugmates