Unity3d.player error: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified

Hi,

I’m trying to integrate an android kotlin SDK with Unity, where my Unity interface interacts with kotlin functions and reads back its output. However, when I try to use the unity3d.player class, I get the following error:

java.lang.SecurityException: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn’t being registered exclusively for system broadcasts

Would love any insights as to why this is happening – currently emulating with API34. Thank you!

Hello,

That’s a known issue. Google requires Exported/Not_exported flag starting with Android 14 (API 34). While fix is on the way - you could try targeting API 33 to workaround this.

Thanks for the response! How long will a fix for this be released? Unfortunately some of the required packages I’m using requires API34+…

I don’t know exact timeframes, but fix is being worked on.

Is there any update on this issue?

Hello.
I think you can check the fixed version here(Unity Issue Tracker - [Android] TargetAPI 34 crash on launch)

@VeryHappyYoung Hello younggrung nim I am derrick, , I’m so glad to see you here. Currenlty
I’m experiencing the same problem in the company
Do you know When will it be applied to version 2021.3.8f1?:,

Thanks,
Happy new year
Derrick

It is fixed in 2021.3.33f1

It is still happening in 2022.3.13f1
And from the comments in the issuetracker above seems to be happening in all “fixed” versions

Same here. Just updated to latest (2021.3.33f) still crashing on start with UAAL

Ditto. Still experiencing this crash in Unity 2021.3.33f1

A bit random question: Do you build AAB and Split app binary is enabled? That’s a different crash caused by Play Asset Delivery: Play Asset Delivery: SecurityException on Android 14

I build AAB without split app binary enabled

AAB without split binary (though I’ve tried it with split while troubleshooting this issue).

It is still happening in 2022.3.15f1 , still having this crash issue
AAB without split binary
PAD was working on android 13 and lower, so i guess it’s not PAD

the error is

2024/01/03 11:18:06.403 17909 17977 Fatal .gtion.testmita thread.cc:2517] No pending exception expected: java.lang.SecurityException: com.gtion.testmita: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn’t being registered exclusively for system broadcasts

It is expected to work on Android versions below 14. Google started enforcing Receiver Exported/Not Exported specifically in Android 14.

Can you share sample projects with repro? Might be a different issue then

sorry, i tried to change Play Asset Delivery , dependencies to 2.1.0 as this release notes
Play Asset Delivery Library release notes | Android Developers

and the crash on start dissapear on android 14, but the bundle can’t be loaded, it’s crash when loading the bundle

the latest PAD version is 1.8.2 (using pad library 2.0.2). i just changing dependencies.xml to 2.1.0
Explore Google packages for Unity | Google for Developers

so yeah, i think it’s different crash, caused by PAD?
here’s the last error i found

2024/01/04 14:03:51.909 28471 28535 Error Unity UnityEngine.AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/activity/result/ActivityResultLauncher;
2024/01/04 14:03:51.909 28471 28535 Error Unity at UnityEngine._AndroidJNIHelper.GetMethodID (System.IntPtr jclass, System.String methodName, System.String signature, System.Boolean isStatic) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.909 28471 28535 Error Unity at UnityEngine.AndroidJavaObject._Call (System.String methodName, System.Object[ ] args) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.909 28471 28535 Error Unity at Google.Play.AssetDelivery.Internal.AssetDeliveryUpdateHandler.CreateInScene (Google.Play.AssetDelivery.Internal.AssetPackManager assetPackManager, Google.Play.AssetDelivery.Internal.PlayRequestRepository requestRepository) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.909 28471 28535 Error Unity at Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal..ctor () [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.909 28471 28535 Error Unity at Google.Play.AssetDelivery.PlayAssetDelivery.get_Instance () [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.909 28471 28535 Error Unity at Google.Play.AssetDeli
2024/01/04 14:03:51.911 28471 28535 Error Unity OperationException : GroupOperation failed because one of its dependencies failed
2024/01/04 14:03:51.911 28471 28535 Error Unity UnityEngine.AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/activity/result/ActivityResultLauncher;
2024/01/04 14:03:51.911 28471 28535 Error Unity at UnityEngine._AndroidJNIHelper.GetMethodID (System.IntPtr jclass, System.String methodName, System.String signature, System.Boolean isStatic) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.911 28471 28535 Error Unity at UnityEngine.AndroidJavaObject._Call (System.String methodName, System.Object[ ] args) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.911 28471 28535 Error Unity at Google.Play.AssetDelivery.Internal.AssetDeliveryUpdateHandler.CreateInScene (Google.Play.AssetDelivery.Internal.AssetPackManager assetPackManager, Google.Play.AssetDelivery.Internal.PlayRequestRepository requestRepository) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.911 28471 28535 Error Unity at Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal..ctor () [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.911 28471 28535 Error Unity at Google.Play.AssetDelivery.PlayAssetDelivery.get_Instanc
2024/01/04 14:03:51.912 28471 28535 Error Unity System.Exception: Dependency Exception ---> UnityEngine.ResourceManagement.Exceptions.OperationException: GroupOperation failed because one of its dependencies failed ---> UnityEngine.AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/activity/result/ActivityResultLauncher;
2024/01/04 14:03:51.912 28471 28535 Error Unity at UnityEngine._AndroidJNIHelper.GetMethodID (System.IntPtr jclass, System.String methodName, System.String signature, System.Boolean isStatic) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.912 28471 28535 Error Unity at UnityEngine.AndroidJavaObject._Call (System.String methodName, System.Object[ ] args) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.912 28471 28535 Error Unity at Google.Play.AssetDelivery.Internal.AssetDeliveryUpdateHandler.CreateInScene (Google.Play.AssetDelivery.Internal.AssetPackManager assetPackManager, Google.Play.AssetDelivery.Internal.PlayRequestRepository requestRepository) [0x00000] in <00000000000000000000000000000000>:0
2024/01/04 14:03:51.912 28471 28535 Error Unity at Google.Play.AssetDelivery.Internal.PlayAssetDeliveryInternal..ctor () [0x00000] in <0000000

@firdiar I believe PAD 2.1.0 has it’s own dependencies that has to be bumped or added on top. As far as I’ve seen these changes should be available in 2021.3.34f1, 2022.3.14f1, 2023.2.4f1. Try using one of these. If issue will be still reproducible - I’d need a repro project to take a look.

    • This continues to happen on 2022.3.14f1. please check
  • Using com.google.play.games → 0.11.01 to use the update manager