0
我已檢查Cursor window could not be created from binder。無法從資料夾中創建Android光標窗口
我得到的內存問題而取出由電話簿聯繫人, 下面是我的代碼,我在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)*
我該如何解決這個問題?
您是否試圖關閉pCur?似乎它應該在每次迭代結束時關閉。 – sandrstar 2013-03-16 07:13:24
@ sandrstar:我已經嘗試了所有顯示在鏈接上http://stackoverflow.com/questions/14316082/cursor-window-could-not-be-created-from-binder – Android 2013-03-16 07:45:01