Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent
Apps targeting Android 12+ must declare PendingIntent mutability; missing flags crash.
Seen on:
Android
Meaning
Add PendingIntent.FLAG_IMMUTABLE for most cases (notifications, alarms). Use FLAG_MUTABLE only when the system must fill in extras (inline reply, bubbles). Old libraries (WorkManager < 2.7, old Firebase/Play Services) also crash — update them.
Common causes
- PendingIntent created without mutability flag
- Outdated library creating PendingIntents (WorkManager, analytics SDKs)
⚡ Quick fix
- Add FLAG_IMMUTABLE (or FLAG_MUTABLE when required)
- Update WorkManager/Firebase/Play Services libraries
Detailed fix by platform
Kotlin
val pi = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
How to diagnose
- Caller — Your code or a dependency?
- Versions — WorkManager ≥ 2.7?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- ActivityNotFoundException ActivityNotFoundException: Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml?
- adb unauthorized adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set
- Android resource linking failed AAPT: error: resource x (aka y) not found — Android resource linking failed
Most viewed in Android
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026