I have a fragment called CalendarFragment. I am getting this error when i tried executing the program. Error:(36, 74) error: incompatible types: CalendarFragment cannot be conve
I suppose your error is indicating the line CalendarEventDataSource dataSource = new CalendarEventDataSource(this);
CalendarEventDataSource dataSource = new CalendarEventDataSource(this);
Try and change this with either getActivity() or getActivity().getApplicationContext() or getActivity().getBaseContext().
this
getActivity()
getActivity().getApplicationContext()
getActivity().getBaseContext()
Also no need for onCreate() as other have suggested.
onCreate()