Cannot resolve method 'show(android.support.v4.app.FragmentManager, java.lang.String)

To solve this, if you are using android.app.DialogFragment, then use getFragmentManager():

mDateButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            FragmentManager fm = getActivity().getFragmentManager();
            DatePickerFragment dialog = new DatePickerFragment();
            dialog.show(fm, DIALOG_DATE);
        }
    });

to use getSupportFragmentManager(), must extend from: android.support.v4.app.DialogFragment.

check your import:

import android.support.v4.app.DialogFragment;