Describe what happened
When changing targetSdk and compileSdk to 31, including the dd-sdk-android dependency will cause a crash at startup:
java.lang.IllegalArgumentException: [REDACTED]: 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:196)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:128)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:93)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
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)
Steps to reproduce the issue:
Change targetSdk and compileSdk to 31
Describe what you expected:
App runs without crash
Possible fixes
Including a dependency to androidx.work:work-runtime:2.7.0-beta01 the problem goes away, so it appears a dependency of dd-sdk-android needs updating.
Additional context
- Android OS version: Android S (SDK 31)
- Device Model: Any
- Datadog SDK version: 1.10.0
Describe what happened
When changing
targetSdkandcompileSdkto31, including thedd-sdk-androiddependency will cause a crash at startup:Steps to reproduce the issue:
Change
targetSdkandcompileSdkto31Describe what you expected:
App runs without crash
Possible fixes
Including a dependency to
androidx.work:work-runtime:2.7.0-beta01the problem goes away, so it appears a dependency ofdd-sdk-androidneeds updating.Additional context