title: java.lang.NoSuchMethodError: android.app.DatePickerDialog.getDatePicker
body: <p>i get </p>
  
  <pre><code>java.lang.NoSuchMethodError: android.app.DatePickerDialog.getDatePicker
  </code></pre>
  
  <p>this exception, when i use my <code>DatePickerDialog</code> on <em>android 2.3.3</em>. I know that <strong><code>getDatePicker()</code></strong> is available from <em>11 api</em>, but all other methods available from api 1. </p>
  
  <p>How can I resolve this problem? I read <a href="https://stackoverflow.com/questions/13403842/android-datepicker-fails-on-android-2-3-3">this</a>,but it isn't work.</p>
  
  <pre><code>dpdBegin = new DatePickerDialog(this,
                  datePickerListener, c.get(Calendar.YEAR), c.get(Calendar.MONTH),    c.get(Calendar.DAY_OF_MONTH));
  
  //exception on this line       
  tvPeriodFrom.setText(
                  (prepareDate(dpdBegin.getDatePicker().getDayOfMonth())) + "-" + prepareDate(dpdBegin.getDatePicker().getMonth() + 1) +
                          "-" + dpdBegin.getDatePicker().getYear());   
  
   dpdBegin = new DatePickerDialog(this,
                  datePickerListener, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH));
  
      //Set dates to textViews
  tvPeriodFrom.setText(
              (prepareDate(dpdBegin.getDatePicker().getDayOfMonth())) + "-" + prepareDate(dpdBegin.getDatePicker().getMonth() + 1) +
                      "-" + dpdBegin.getDatePicker().getYear());
  </code></pre>
  
  <p>In log is</p>
  
  <pre><code>    04-21 06:49:57.833: ERROR/AndroidRuntime(399): FATAL EXCEPTION: main
      java.lang.NoSuchMethodError: android.app.DatePickerDialog.getDatePicker
      at ua.khuta.mobilereception.EventsActivity.onCreate(EventsActivity.java:88)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
      at android.app.ActivityThread.access$1500(ActivityThread.java:117)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:130)
      at android.app.ActivityThread.main(ActivityThread.java:3683)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:507)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
      at dalvik.system.NativeStart.main(Native Method)
  </code></pre>