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.

  • You absolutely don't need to change your targetSdkVersion to upgrade past 1.0.0-alpha02 (just your compileSdkVersion). – ianhanniballake Jul 24 at 4: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 stackoverflow.com/questions/26694108/… Thanks. – Cheok Yan Cheng Jul 24 at 5:10
  • There's a whole blog post on how completely differently they affect your app. – ianhanniballake Jul 24 at 5:13
  • Thank you. I will take a look too. – Cheok Yan Cheng Jul 24 at 5:24
  • 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 at 12:49

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.