user3324984
user3324984

Reputation: 349

Android: DatePickerDialog cannot be resolved to a type

I'm trying to implement a date picker into my android application however I cannot seem to find the DatePickerDialog interface.

public class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener{

}

Following the instructions on this page - http://developer.android.com/guide/topics/ui/controls/pickers.html

I get the DatePickerDialog underlined in red with an error of DatePickerDialog cannot be resolved to a type. Some sort of library or something I need to import? I'm pretty sure I have the support library setup as is.

Upvotes: 1

Views: 3231

Answers (1)

Niko Adrianus Yuwono
Niko Adrianus Yuwono

Reputation: 11112

You need to add

import android.app.DatePickerDialog;

Upvotes: 3

Related Questions