1 Cursor cursor = contentResolver.query(MY_URI, new String[] { "first" }, null, null, null);
2 if (cursor != null) {
3 if (cursor.moveToFirst()) {
4 first = cursor.getString(cursor.getColumnIndex("first"));
5 cursor.close();
6 }
7 }
然后在第 3 行(根据日志),我不时遇到这个异常(摘录如下):
android.database.CursorWindowAllocationException: Cursor window could not be created from binder.
at android.database.CursorWindow.<init>(CursorWindow.java:134)
at android.database.CursorWindow.<init>(CursorWindow.java:41)
at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:709)
at android.database.CursorWindow$1.createFromParcel(CursorWindow.java:707)
at android.database.CursorWindow.newFromParcel(CursorWindow.java:718)
at android.database.BulkCursorProxy.getWindow(BulkCursorNative.java:196)
...
任何想法为什么它会抛出这个异常?谢谢!