1

I'm using ContentProvider in my android application. But I'm getting this issue while calling methods.

09-22 11:40:11.054: E/AndroidRuntime(12589): java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
2
  • 2
    add code here.. to understand issue. Commented Sep 22, 2015 at 11:06
  • 2
    Add Source Code. We need it to find the problem. Commented Sep 22, 2015 at 11:21

1 Answer 1

1

Try calling cursor.moveToFirst(); , before you use it. Also check if your cursor is not empty : if (cursor.getCount()) ;One possible issue could be that you closed your cursor somewhere , and you try to access it ...

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer but I have tracked some other flow from app because I'm using fragment and was creating new LoaderManager with same ID in each fragment, so that it cause this issue. But now I'm using same object of LoaderManager in all fragment and using different ID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.