Android - DatePickerDialog - Old APIs

GuiDupas picture GuiDupas · Sep 22, 2016 · Viewed 9.8k times · Source

I am trying to create a DatePickerDialog in my app in Android but when I create a DatePickerDialog I receive the following message: Call requires API level 24 (current min is 14): android.app.DatePickerDialog#DatePickerDialog

How can I use a DatePickerDialog in old API versions?

Answer

laalto picture laalto · Sep 22, 2016

Use one of the constructors added in API level 1, not one of those added in API level 24.