title: Minimum API for DatePicker
body: <p>I'm testing just a sample of code in order to implement in other app, but I have got an error saying that the minimum API required in order to use getInstance() is 24, and I'm current using API 16. But I had searched on the Internet and it appears that this can be used since API 1 O.o Can I ignore this error?</p>
  
  <pre><code>import android.app.DatePickerDialog;
  import android.icu.util.Calendar;
  import android.support.annotation.RequiresApi;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.DatePicker;
  import android.widget.EditText;
  
  public class MainActivity extends AppCompatActivity {
  
      DatePickerDialog datePickerDialog;
      EditText date;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          date = (EditText)findViewById(R.id.date);
  
          date.setOnClickListener(new View.OnClickListener(){
  
  
              @RequiresApi(api = Build.VERSION_CODES.N)
              @Override
              public void onClick(View v) {
                  final Calendar c;
                  c = Calendar.getInstance();
                  int mYear = c.get(Calendar.YEAR);
                  int mMonth = c.get(Calendar.MONTH); 
                  int mDay = c.get(Calendar.DAY_OF_MONTH); 
                  //Dialog DatePicker
                  datePickerDialog = new DatePickerDialog(MainActivity.this, new
                  DatePickerDialog.OnDateSetListener(){
                      @Override
                      public void onDateSet(DatePicker view,int year, int monthOfYear, int dayOfMonth){
                          date.setText(dayOfMonth + "/" +(monthOfYear + 1) + "/" + year);
                      }
                  },mYear,mMonth,mDay);
                  datePickerDialog.show();
              }
          });
      }
  }
  </code></pre>