Recommended solutions based on your search
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.
Solutions on the web