我使用以下方法在本地删除Google日历上的所有事件(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
答案 0 :(得分:0)
我遇到过这几次,这很烦人!遗憾的是,这是一个已知且持续存在的问题。它上面有一个existing bug report,但它仍未得到纠正。
要解决此问题,您必须清除本地日历缓存。
为此,请在您的设备上执行以下操作:
股票Android:
Settings > Applications > Manage Applications > Calendar Storage > Clear data
HTC Sense:
Settings > Apps > All > Calendar Storage > Clear data
一旦你这样做,问题就会消失。