java.lang.SecurityException: com.xxxx.yyyyyy: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered

My environement is like below:
Ionic:

Ionic CLI : 7.2.0 (C:\Users\s1100\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 6.1.9
@angular-devkit/build-angular : 13.3.11
@angular-devkit/schematics : 13.3.11
@angular/cli : 13.3.11
@ionic/angular-toolkit : 6.1.0

Cordova:

Cordova CLI : 12.0.0 (cordova-lib@12.0.1)
Cordova Platforms : android 12.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 16 other plugins)

Utility:

cordova-res : 0.15.4
native-run (update available: 2.0.1) : 1.7.3

System:

Android SDK Tools : 26.1.1 (C:\Users\s1100\AppData\Local\Android\Sdk)
NodeJS : v20.14.0 (C:\Program Files\nodejs\node.exe)
npm : 9.8.1
OS : Windows 10

I am updating to SDK34 i got error java.lang.SecurityException: com.xxxx.yyyyyy: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn’t being registered how to fix this issue
My Android Manifest.Xml is

<?xml version='1.0' encoding='utf-8'?> ****

You need to be on Cordova 13 in order to support Android SDK 34 - Android Platform Guide - Apache Cordova

We updated the cordova to 13 ,Please see the below details

Ionic:

Ionic CLI : 7.2.0 (C:\Users\s1100\AppData\Roaming\npm\node_modules@ionic\cli)

Ionic Framework : @ionic/angular 6.7.5

@angular-devkit/build-angular : 13.3.11

@angular-devkit/schematics : 13.3.11

@angular/cli : 13.3.11

@ionic/angular-toolkit : 6.1.0

Cordova:

Cordova CLI : 12.0.0 (cordova-lib@12.0.1)

Cordova Platforms : android 13.0.0

Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 17 other plugins)

Utility:

cordova-res : 0.15.4

native-run (update available: 2.0.1) : 1.7.3
Still we got same error

Ok, then you need to check all of your installed plugins and make sure they are on versions that support Android SDK 34.

This has to do with a requirement Android made. See android - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts - Stack Overflow.

While using FCM Plugin we are facing this issue ,without fcm plugin its working without crash,How to fix this issue?Please share your idea

What FCM plugin are you using? The npm package name or link to the GitHub repo is key.

We used this FCM Plugin,FCM Repo
I deleted the plugin and platform folders and rebuild the app now issue fixed thank you for your comments

Updated Environment:
Ionic:

Ionic CLI : 7.2.0 (C:\Users\s1100\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 13.3.11
@angular-devkit/schematics : 13.3.11
@angular/cli : 13.3.11
@ionic/angular-toolkit : 6.1.0

Cordova:

Cordova CLI : 12.0.0 (cordova-lib@12.0.1)
Cordova Platforms : android 12.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 17 other plugins)

Utility:

cordova-res : 0.15.4
native-run (update available: 2.0.1) : 1.7.3

System:

Android SDK Tools : 26.1.1 (C:\Users\s1100\AppData\Local\Android\Sdk)
NodeJS : v20.14.0 (C:\Program Files\nodejs\node.exe)
npm : 9.8.1
OS : Windows 10

1 Like

Thanks for the link, you saved my day.

.

You’re encountering a security exception related to the Android manifest when updating to SDK34. This issue arises because Android requires explicit declarations for broadcast receivers. To fix it, you need to update your AndroidManifest.xml file to include either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED attributes for your broadcast receivers. Check the Android documentation for details on how to properly declare these attributes. For students facing the pressure of writing assignments, Write My Coursework for Me - Cheap, Fast and Safe Service offers support. The platform provides a variety of services, from essays to research papers, ensuring all work is plagiarism-free and open to revisions, aiding in managing academic demands.

1 Like