我使用以下方法在本地删除谷歌日历上的所有事件(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");
}
Run Code Online (Sandbox Code Playgroud)
一切正常,但我收到一个恼人的警告:删除太多日历
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.
Run Code Online (Sandbox Code Playgroud)
错误显示的原因是什么,有没有人知道避免错误的方法?我正在使用HTC One-X
关心R.
我遇到过几次这样的情况,非常烦人!不幸的是,这是一个已知且持续存在的问题。有一个现有的错误报告,但仍未得到纠正。
要解决此问题,您必须清除本地日历缓存。
为此,请在您的设备上执行以下操作:
库存安卓:
Settings > Applications > Manage Applications > Calendar Storage > Clear data
Run Code Online (Sandbox Code Playgroud)
HTC Sense:
Settings > Apps > All > Calendar Storage > Clear data
Run Code Online (Sandbox Code Playgroud)
一旦你这样做了,问题就会消失。
| 归档时间: |
|
| 查看次数: |
1719 次 |
| 最近记录: |