title: JobScheduler.schedule(job) is not starting the JobService
body: <p>I am using a <a href="https://github.com/evant/JobSchedulerCompat" rel="noreferrer">lib</a> for JobScheduler to work on pre-lollipop devices.I am using a lollipop device.The problem is mJobScheduler.schedule(job) should start my jobservice but it is not starting. Also when i include the .setPeriodic(2000) method the app crashes with this </p>
  
  <p>stack trace.</p>
  
  <pre><code>08-06 00:37:06.729 19693-19693/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: rishabh.example.com.myapplication, PID: 19693
                                                 java.lang.RuntimeException: Unable to start activity ComponentInfo{rishabh.example.com.myapplication/rishabh.example.com.myapplication.MainActivity}: java.lang.IllegalArgumentException: Can't call setOverrideDeadline() on a periodic job.
                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
                                                     at android.app.ActivityThread.access$800(ActivityThread.java:155)
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                     at android.os.Looper.loop(Looper.java:135)
                                                     at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
                                                  Caused by: java.lang.IllegalArgumentException: Can't call setOverrideDeadline() on a periodic job.
                                                     at me.tatarka.support.job.JobInfo$Builder.build(JobInfo.java:477)
                                                     at rishabh.example.com.myapplication.MainActivity.constructJob(MainActivity.java:30)
                                                     at rishabh.example.com.myapplication.MainActivity.onCreate(MainActivity.java:19)
                                                     at android.app.Activity.performCreate(Activity.java:6010)
                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) 
                                                     at android.app.ActivityThread.access$800(ActivityThread.java:155) 
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 
                                                     at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                     at android.os.Looper.loop(Looper.java:135) 
                                                     at android.app.ActivityThread.main(ActivityThread.java:5343) 
                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                     at java.lang.reflect.Method.invoke(Method.java:372) 
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) 
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) 
  </code></pre>
  
  <p>MY MainActivity</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  JobScheduler mJobScheduler;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      mJobScheduler=JobScheduler.getInstance(this);
      constructJob();
  }
  
  private void constructJob() {
  
      JobInfo job = new JobInfo.Builder(0 /*jobid*/, new ComponentName(this,MyService.class))
              .setMinimumLatency(1000)
              .setOverrideDeadline(2000)
              .setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED)
              .setRequiresCharging(true)
              .setPeriodic(2000)
              .build();
  
  
  
      mJobScheduler.schedule(job);
  
  }
  }
  </code></pre>
  
  <p>MyService class</p>
  
  <pre><code>public class MyService extends JobService {
  @Override
  public boolean onStartJob(JobParameters params) {
      Toast.makeText(getApplicationContext(),"onStartjob",Toast.LENGTH_SHORT).show();
      Log.i("tag","onstartjob");
      return false;
  }
  
  @Override
  public boolean onStopJob(JobParameters params) {
      return false;
  }
  }
  </code></pre>
  
  <p>My manifest file</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="rishabh.example.com.myapplication"&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/&gt;
  &lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
      &lt;activity android:name=".MainActivity"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;service android:name=".MyService"
          android:permission="android.permission.BIND_JOB_SERVICE"
          android:exported="true"&gt;
  
      &lt;/service&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>