android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0

Stack Overflow | Sohaib Riaz | 7 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd and rp . Or join the community to write better ones.
  1. 0

    How to set default value 0 and how to remove the error "null value in column"?

    Stack Overflow | 7 months ago | Sohaib Riaz
    android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
  2. 0
    samebug tip
    You have an empty cursor. Check your query if it is not expected, or handle empty cursor with `if(cursor.getCount() > 0) ...`
  3. 0
    samebug tip
    You need to make sure that there is a data in the cursor. Check that moveToFirst() return true.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Sqllite database query having some issues while fetching

    Stack Overflow | 1 year ago | user3585510
    android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
  6. 0

    Cursor Index Out Of Bound Exception

    Stack Overflow | 3 years ago | Mathews JP
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.onlineexam/com.example.onlineexam.AttendExam}: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0

  1. rafael 1 times, last 2 months ago
  2. Akshay 1 times, last 9 months ago
  3. faisalmohd83 2 times, last 11 months ago
23 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. android.database.CursorIndexOutOfBoundsException

    Index 0 requested, with a size of 0

    at android.database.AbstractCursor.checkPosition()
  2. Android Platform
    AbstractWindowedCursor.getString
    1. android.database.AbstractCursor.checkPosition(AbstractCursor.java:426)
    2. android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:136)
    3. android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:50)
    3 frames
  3. com.sohaib.dailyexpense
    Database.insertContact
    1. com.sohaib.dailyexpense.Database.doUpdateInc(Database.java:77)
    2. com.sohaib.dailyexpense.Database.insertContact(Database.java:87)
    2 frames