我正在使用此代码从日历中获取事件。
但我得到了这样的错误:
request time failed: java.net.SocketException: Address family not supported by protocol
调试时,我注意到这一行的代码崩溃:
Cursor eventCursor = contentResolver
.query(builder.build(), new String[]
{ "title", "begin", "end", "allDay" },
"Calendars._id=" + 1, null,
"startDay ASC, startMinute ASC");
System.out.println("eventCursor count=" + eventCursor.getCount());
任何想法都会有所帮助。谢谢。