I am calling several CoroutineWorker
classes in my Android application. In the past, I could easily watch details for each worker execution in the "Background Task Inspector" of Android Studio. According to the documentation, the only requirement is version 2.5.0
or above.
Coming back to the project after a while, the app inspection pane has changed and grouping has been introduced:
This is not a problem. The problem is, that all of my "CoroutineWorker"s are showing up as Jobs and all are called "SystemJobService" all of a sudden:
Instead of "SystemJobService", I expect the name of the CoroutineWorker class to be displayed. Including additional information and features like Graph View. The options are still there, but my workers are not interpreted as such, hence, I can't make use of any of the features.
All the information displayed for my workers, which are showing up as jobs:
I have tested this with Android SDK 32
, AGP 7.4.2
, am using Android Studio Flamingo 2022.2.1 Patch 2
, and (among others) have installed the following libraries:
implementation "androidx.work:work-runtime:2.7.1"
implementation "androidx.work:work-runtime-ktx:2.7.1"
implementation "androidx.work:work-multiprocess:2.7.1"
After patching the IDE, I have run the project as usual and with the new pane, my workers were interpreted as jobs, including their anonymous class names.
- I have tried older and newer (canary build) versions of Android Studio
- I have tried updating to the latest WorkManager version
2.8.1
- I have tried upgrading to AGP
8.0.2
- I have tried running the project on an Android Emulator with SDK 28, 29, 30, 32, 33
But none of it made a difference. Some of the attempts in combination. I feel like the underlying issue is much simpler.