In the future, please always provide the full debug info. Line numbers from a stack trace are only useful when they can be associated to a certain file version, which can be determined from the DAVdroid version.
It seems like the problem is at
builder .withValue(Tasks.COMPLETED, task.completedAt.getDateTime().getTime())
The cause of your problem seems to be that COMPLETED is of type DATE in your iCalendar. However, COMPLETED must be a DATE-TIME and not a DATE. DAVdroid expects a DATE-TIME and wants to get its UNIX time, so there’s a cast exception when it tries to evaluate the DATE as DATE-TIME.
Solution: Please fix your task so that COMPLETED is a DATE-TIME, as specified in RFC 5545.
However, DAVdroid may be more resilient against this and convert DATE to DATE-TIME with 00:00 time in this case.