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.
requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntentTargeting S+ (version 31 and above) 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
- Could not resolve Gradle: Could not resolve all files for configuration / Could not resolve dependency
- INSTALL_FAILED_USER_RESTRICTED INSTALL_FAILED_USER_RESTRICTED: Install canceled by user (Xiaomi/MIUI, Oppo, Vivo)
- INSTALL_PARSE_FAILED_NO_CERTIFICATES INSTALL_PARSE_FAILED_NO_CERTIFICATES / App not installed as package appears to be invalid
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 12 Oct 2026