0

I’m having trouble running my android app ever since I added a DatePicker. I'm running my app using a Virtual Device running Nougat 7.1.1 API level 25, but the app would crash every time I would click on the button that allows the user to pick a date. My app gives me a pop up saying that the app has stopped working whenever I would try and click on the button to pick a date. Also, in my dialog_date.xml preview, it gives me the following error (screen shot right below). I've already tried clicking on the tips. Do I need to add any dependencies in my build.gradle file for the DatePicker to be found? I've been trying to figure this out for 3 hours now.

enter image description here

Below I have posted my build.gradle, DatePickerFragment.java, and dialog_date.xml.

dialog_date.xml enter image description here

build.gradle file enter image description here

DatePickerFragment.java enter image description here

asilvester635
  • 81
  • 2
  • 13

1 Answers1

0

I don't know why you think android.support.constraint.DatePicker exists. The documentation for DatePicker shows it as android.widget.DatePicker.

kabuko
  • 36,028
  • 10
  • 80
  • 93