SecurityException: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
Apps targeting Android 14 must say whether a runtime-registered BroadcastReceiver is exported.
Seen on:
Android
Meaning
registerReceiver() without the flag crashes on Android 14 for non-system broadcasts. Use ContextCompat.registerReceiver with RECEIVER_NOT_EXPORTED for in-app broadcasts. Old libraries can cause it too — update them.
Common causes
- registerReceiver without export flag (targetSdk 34)
- Third-party SDK registering receivers the old way
⚡ Quick fix
- Pass ContextCompat.RECEIVER_NOT_EXPORTED (or EXPORTED when other apps must send)
- Update SDKs that crash
Detailed fix by platform
Kotlin
ContextCompat.registerReceiver(this, receiver, IntentFilter("com.example.ACTION"), ContextCompat.RECEIVER_NOT_EXPORTED)
How to diagnose
- Caller — Your code or a library (stack trace)?
- Target — targetSdk 34+?
🔧 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