我在 HTC(v2.3.3) 中收到此错误并在 Galaxy s3(v4.1) 中工作
Intent intent = new Intent(Intent.ACTION_EDIT)
.setData(Uri.parse(EventUtils.EVENT_URI))
.putExtra(Event.EXTRA_EVENT_BEGIN_TIME,
beginTime.getTimeInMillis())
.putExtra(Event.EXTRA_EVENT_END_TIME, endTime.getTimeInMillis())
.putExtra(
Event.TITLE,
Utils.getPref(getApplicationContext(),
Constant.PREF_EVENT_TAG,
Constant.CONST_EVENT_TAG)
+ "Meeting")
.putExtra(Event.DESCRIPTION, "important meeting")
.putExtra(Event.AVAILABILITY, Events.AVAILABILITY_BUSY);
// .putExtra(Event.EVENT_LOCATION, "The gym")
// .putExtra(Intent.EXTRA_EMAIL,
// "rowan@example.com,trevor@example.com");
if (calID != -1) {
intent.putExtra(Event.CALENDAR_ID, calID);
}
startActivity(intent);
例外
01-13 18:58:59.417: E/AndroidRuntime(31730): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.EDIT dat=content://com.android.calendar/events (has extras) }
如何解决?