android.database.CursorIndexOutOfBoundsException

Index 0 requested, with a > size of 0 >

Samebug tips3

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

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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web397

  • via GitHub by kordianbruck
    , 1 year ago
    Index 0 requested, with a size of 0
  • via GitHub by devonjones
    , 1 year ago
    Index 0 requested, with a size of 0
  • via GitHub by kordianbruck
    , 1 year ago
    Index 0 requested, with a size of 0
  • Stack trace

    • android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a > size of 0 > at android.database.AbstractCursor.checkPosition(AbstractCursor.java:424)

    Write tip

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

    Users with the same issue

    16 times, 11 months ago
    9 times, 5 months ago
    6 times, 11 months ago
    11 times, 1 year ago
    Once, 1 year ago
    51 more bugmates