-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞 FLAG_IMMUTABLE or FLAG_MUTABLE causing app crashes in Unity Android Build #585
Comments
Hello! Thank you for the report. The issue arises because Mapbox Events Android does not support SDK 31 and higher. We are considering either removing this dependency from the Unity SDK or updating Mapbox Events Android to support the latest Android SDK. It may take some time, we will post an update here. |
We decided to release a new version of Unity SDK with the removed mapbox-events-android dependency. |
Any updates on this?? |
@smart09091 , @vanisrimursha |
@smart09091 @vanisrimursha |
@smart09091 @vanisrimursha I tested using target version 33 and android 14. |
Configuration
Steps to Reproduce
It happens intermittently but whenever my app is doing anything mapbox related like get map information, I get this error
Error Unity Error initializing telemetry: UnityEngine.AndroidJavaException: java.lang.IllegalArgumentException: com.nmy.unseen: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 2022.12.23 12:13:16.783 19432 19454 Error Unity Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
it doesnt happen as often but we've noticed that this is usually the last error being logged whenever the app crashes. I've tried to set the target API level of our android app to 30 for the meantime and the errors have disappeared but I dont think this is a good solution especially if we're going to release our app on the playstoreExpected
Is there a fix for unity that addresses this? I've seen a few issues that suggest editing .jar files to add the FLAG_IMMUTABLE line of code but I dont know how to implement these fixes for the unity app. Can I ask for help on how to remedy this or if there's already a fix for this, could someone point me in the right direction?
Logging
Error Unity Error initializing telemetry: UnityEngine.AndroidJavaException: java.lang.IllegalArgumentException: com.nmy.unseen: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 2022.12.23 12:13:16.783 19432 19454 Error Unity Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
The text was updated successfully, but these errors were encountered: