For the complete documentation index, see llms.txt. This page is also available as Markdown.

FAQ & Troubleshooting

Historical Android 12 PendingIntent crash (older WorkManager dependencies)

Some older dependency combinations produced the following Android 12 error. Diagnose the resolved WorkManager version rather than assuming every app using AGP 7.2.0 is affected:

2022-06-14 11:30:19.954 21270-21290/tv.fw.example.discovery E/AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1
    Process: tv.fw.example.discovery, PID: 21270
    java.lang.IllegalArgumentException: tv.fw.example.discovery: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
        at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
        at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
        at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
        at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:174)
        at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:108)
        at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:86)
        at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:920)

The historical workaround used WorkManager 2.7.1, as discussed in the original report. This is not a recommendation to pin a current app to that old version:

    // Required to avoid crash on Android 12 API 31
    // https://stackoverflow.com/a/69152986/2359762
    implementation("androidx.work:work-runtime-ktx:2.7.1")

Inspect your resolved dependency tree and choose a WorkManager version compatible with your application. Keep this workaround limited to the matching historical crash.

Analytics callbacks missing in minified builds

SDK 6.35.1 fixes a known issue where R8 could remove analytics callbacks. If you encounter this issue on an older SDK, upgrade to a version containing the fix. The standard SDK artifact includes the required callback keep rules.

Ensure the listener is still registered while events are expected and follows the analytics registration lifecycle.

Last updated

Was this helpful?