Error when trying to access Cursor data
问题 I have a populated Database in my app but I'm having trouble to access data through a returned cursor from the query method. Cursor query = getContentResolver().query(MoviesContract.MoviesEntry.CONTENT_URI, null, null, null, null); query.moveToFirst(); while (query.isAfterLast() == false){ Log.d("Test", query.getString(0)); query.moveToNext(); } I'm doing tests on this block of code. When I execute the Log.d line, this error is raised: java.lang.IllegalStateException: Couldn't read row 0, col