我已查看Cursor window could not be created from binder。
我从电话簿中取出联系人时遇到内存问题, 下面是我的代码,我在OS 4 +中测试它
Cursor cursor =managedQuery(ContactsContract.Contacts.CONTENT_URI,
new String[]{Data._ID,"display_name","photo_id","starred"},
null, null, "UPPER(" + ContactsContract.Contacts.DISPLAY_NAME + ") ASC , "
+ ContactsContract.Contacts.HAS_PHONE_NUMBER+ " DESC" );
Cursor pCur;
Cursor emailCur;
while(cursor.moveToNext()) {
pCur = WP7Main.this.managedQuery(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
projPhone, ContactsContract.CommonDataKinds.Phone.CONTACT_ID
+ " = ?", new String[] { id }, null);
}
我在asyncTask中做了这个,它有近700多个联系人
我收到以下错误
E/CursorWindow(25078): Could not create CursorWindow from Parcel due to error -12.
W/dalvikvm(25078): threadid=14: thread exiting with uncaught exception (group=0x40c66930)
E/AndroidRuntime(25078): FATAL EXCEPTION: AsyncTask #3
E/AndroidRuntime(25078): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime(25078): at android.os.AsyncTask$3.done(AsyncTask.java:299)*
我该如何解决这个问题?
答案 0 :(得分:0)