heysupratim / material-daterange-picker

A material Date Range Picker based on wdullaers MaterialDateTimePicker
Apache License 2.0
1.33k stars 266 forks source link

ClassCastException #59

Closed DCodeOS closed 5 years ago

DCodeOS commented 7 years ago

Hello, I saw different posts exposing this issue but any of those solved my case. I specify full namespace of the DatePickerDialog Calendar now = Calendar.getInstance(); com.borax12.materialdaterangepicker.date.DatePickerDialog.newInstance( null, now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DAY_OF_MONTH) ).show( getActivity().getFragmentManager(), "Datepickerdialog" ); but it gives me a class cast exception, java.lang.ClassCastException: com.wdullaer.materialdatetimepicker.date.AccessibleDateAnimator cannot be cast to com.borax12.materialdaterangepicker.date.AccessibleDateAnimator

The build.gradle file includes both libraries as follow compile 'com.wdullaer:materialdatetimepicker:2.5.0' compile 'com.borax12.materialdaterangepicker:library:1.9'

Any suggestion to how solve this case?

Thanks in advance @borax12 !

irinalomaka commented 7 years ago

@DCodeOS remove compile 'com.wdullaer:materialdatetimepicker:2.5.0'

heysupratim commented 5 years ago

The two projects use a different resource qualifier now and this shouldn't be a problem anymore