1

We are using the following WorkManager

def work_version = "1.0.0-alpha02"
implementation "android.arch.work:work-runtime:$work_version" // use -ktx for Kotlin
// optional - Firebase JobDispatcher support
implementation "android.arch.work:work-firebase:$work_version"

We not upgraded from 1.0.0-alpha02, as we want to maintain our targetSdkVersion 27.

In production, we notice the following crash report.

java.lang.IllegalStateException: 
  at android.os.Parcel.readException (Parcel.java:1701)
  at android.os.Parcel.readException (Parcel.java:1646)
  at android.app.job.IJobScheduler$Stub$Proxy.schedule (IJobScheduler.java:158)
  at android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:42)
  at androidx.work.impl.background.systemjob.SystemJobScheduler.scheduleInternal (SystemJobScheduler.java:85)
  at androidx.work.impl.background.systemjob.SystemJobScheduler.schedule (SystemJobScheduler.java:64)
  at androidx.work.impl.Schedulers.scheduleInternal (Schedulers.java:98)
  at androidx.work.impl.Schedulers.schedule (Schedulers.java:69)
  at androidx.work.impl.WorkManagerImpl.rescheduleEligibleWork (WorkManagerImpl.java:398)
  at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:69)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
  at java.lang.Thread.run (Thread.java:762)

Please advice how we can get rid of these crashed. Thanks.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
  • You absolutely don't need to change your `targetSdkVersion` to upgrade past `1.0.0-alpha02` (just your `compileSdkVersion`). – ianhanniballake Jul 24 '18 at 04:56
  • Argh... I think I had mixed up compileSdkVersion with targetSdkVersion. We never use compileSdkVersion before this. I'm going to give it a try, although I still can hardly understand the difference among 2 after reading https://stackoverflow.com/questions/26694108/what-is-the-difference-between-compilesdkversion-and-targetsdkversion Thanks. – Cheok Yan Cheng Jul 24 '18 at 05:10
  • There's a [whole blog post](https://medium.com/google-developers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd) on how completely differently they affect your app. – ianhanniballake Jul 24 '18 at 05:13
  • Thank you. I will take a look too. – Cheok Yan Cheng Jul 24 '18 at 05:24
  • @ianhanniballake One question. If I were to change `compileSdkVersion` to 28, am I forced to use `28.0.0 Alpha 1` support library (appcompat, design, gridlayout, ...) as well? As, gradle gives me such warning? Can I just stay with 27.1.1? As I do not feel comfortable with alpha version of lib. – Cheok Yan Cheng Jul 24 '18 at 07:30
  • 1
    You can ignore the warning if you want. FWIW, every Google app ships with the alpha version of the Support Library, so it is well tested in production. – ianhanniballake Jul 24 '18 at 12:49

0 Answers0