I'm want to implement Firebase JobDispatcher
for running background operations. But while Extending JobService, it's showing error as class requires api level 21
. Why ?
Asked
Active
Viewed 300 times
1

minato
- 2,028
- 1
- 18
- 30
2 Answers
2
Replace import android.app.job.JobService
with import com.firebase.jobdispatcher.JobService

Developer 2
- 240
- 1
- 3
- 8
0
JobService
is added in API level 21, so the minimum required sdk version should be 21, otherwise it will show error class requires api level 21
in your app
gradle file set your minimum sdk version 21
minSdkVersion 21
Refrence :- JobService

Nirav Bhavsar
- 2,133
- 2
- 20
- 24