I was testing my app with the new Android 5.0 (API21) but was getting an error with the CalendarView
Caused by: java.lang.UnsupportedOperationException: CalendarView does not exists for the new DatePicker at android.widget.DatePickerCalendarDelegate.getCalendarView(DatePickerCalendarDelegate.java:501) at android.widget.DatePicker.getCalendarView(DatePicker.java:365)
For my surprise the error was not because there is no CalendarView in the NEW API21 DatePicker, in fact, there is no DatePicker in API21, just CalendarView.
The error was produced because I was hidding the Week Numbers in the CalendarView
picker.getCalendarView().setShowWeekNumber(false);
This instruction throws the UnsupportedOperationException, be warned no more Week Numbers in the CalendarView, they just disappeared it, no explanation.