5

我使用以下方法在本地(ICS & JB)删除谷歌日历上的所有事件:

public void deleteAll(){
    String selection = "(" + CalendarContract.Events.CALENDAR_ID + " = ?)";
    String[] selectionArgs = new String[] { Integer.toString(this.calId) };
    ContentResolver cr = context.getContentResolver();
    int rows = cr.delete(CalendarContract.Events.CONTENT_URI, selection, selectionArgs);
    Log.d(TAG, rows + " events deleted");
}

一切正常,但我收到一个烦人的警告:日历删除过多

Delete limit exceeded

 There are 21 deleted items for Calendar, account
 xxxxx.xxxxx@gmail.com.  What would you like to do?" 

Delete the items. 
Undo the deletes.  
Do nothing for now.

显示错误的原因是什么,有人知道避免它的方法吗?我正在使用 HTC One-X

问候 R

4

1 回答 1

0

遇到过几次,很烦!不幸的是,这是一个已知且持续存在的问题。有一个关于它的现有错误报告,但它仍然没有得到纠正。

要解决此问题,您必须清除本地日历缓存。

为此,请在您的设备上执行以下操作:

库存安卓:

Settings > Applications > Manage Applications > Calendar Storage > Clear data

宏达感:

Settings > Apps > All > Calendar Storage > Clear data

一旦你这样做了,问题就会消失。

于 2013-10-06T19:56:52.140 回答