Using Unity 2021.3.28f1 the com.unity3d.player.PlayAssetDeliveryUnityWrapper.registerDownloadStatusListener module is throwing “SecurityException: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn’t being registered exclusively for system broadcasts” on Android 14 when targeting Android API 34." Attached is a stack trace. Is this fixed in a newer 2021 release and/or is a fix in the works? All that is required is to add of the parameters such as:
Issue is coming from
‘com.google.android.play:asset-delivery:2.0.0’ package. As a workaround you can try exporting your project, modify build.gradle
(changing from
implementation ‘com.google.android.play:asset-delivery:2.0.0’
to
implementation ‘com.google.android.play:asset-delivery:2.1.0’)
and building from Android Studio.
Or another option - enable Custom Main Gradle template in Player → Publishing settings and add
implementation ‘com.google.android.play:asset-delivery:2.1.0’ to the dependencies section
@IGuscin thank you for the suggestion. Unfortunately, changing to version 2.1.0 results in an immediate crash on startup. I’ve attached the crash stack trace
We’re getting the same problem with the latest 2020.3 release when building an android AAB bundle with “split application binary” enabled (to generate embedded asset packs).
As stated before, the solution provided here doesn’t work for multiple reasons:
the “com.google.android.play:asset-delivery” library is not in the dependencies of the build.gradle file in Unity 2020 or 2021, instead the older “com.google.android.play:core” is. And you can’t just replace one with the other without also altering the native android player code…
This essentially replaces a problem with another.
the exception is clearly thrown from native android player code not meeting the API requirements. Unless the newer versions of this API reverted those requirements, the provided solution has no chance to work.
As of now, building an Android AAB app targetting Android 14 (API 34) using Unity 2020 or 2021 is impossible if you also want to use embedded asset packs by enabling the “split application binary” option.
As far as I know 2020.3 is no longer supported, so I wouldn’t expect fix to land there. For 2021.3 - fix was actually targeting this specific case. Crash was occurring in Google ‘com.google.android.play:asset-delivery:2.0.0’ package, so the fix was to bump package version in 2022.3 and above Unity versions and to replace obsolete com.google.android.play:core package in 2021.3
Maybe I’m missing something? I’ve downloaded your sample project, opened using Unity 2021.3.35f1, specified signing key, built using MVP->Build, uploaded to the Play Store Internal testing track, downloaded to the Pixel 6 Pro Android 14 device. No crash occurred. Seeing empty scene with Build ID in the bottom
I did sample for 2021.3.34f1, idk, may be it’s required…
Also google store isn’t required, I can reproduce crash just use adb or bundletool commands for instal apk or aab to my device.
May be need specific device OS, my device is oneplus 10 pro, OS - OxygenOS 14.0
And your app crash with exception: java.lang.NoSuchMethodError: No interface method getPackStates(Ljava/util/List;)Lcom/google/android/play/core/tasks/Task;