Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 126.96.36.199 release ready!
Updated 27 October 2023
Hi, today we will check one of the most common gradle issues with Flag Immutable and Flag Mutable In Flutter.
You will see the below error statement on your console:-
ava.lang.IllegalArgumentException: bundleId: Targeting S+ (version 31 and above) requires that one of Flag Immutable and Flag Mutable be specified when creating a PendingIntent.
W/System.err( 9990): 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.
This is the flutter gradle issue and can pop on many occasions. Some common occasions are when you try to perform some task like notification on the device with API level 31 or above. i.e. Android 12 or above.
If you’re encountering this issue in a Flutter app, it means that you need to make sure that you specify one of these flags when creating a PendingIntent in your Android-specific code (usually located in the android directory of your Flutter project).
Learn more about our Flutter Development Services.
Now, the main question is how to resolve this issue.
While solving this issue you need to consider the below point carefully and follow the instructions on it:-
“W/System.err( 9990): 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.”
Here you will need to change the Flag Mutability and Pending Intent in your project.
You can set your pending intent and Flag Mutability as below:-
In this blog, we have checked one of the most common gradle error popups, with the Flutter applications.
Thanks for reading this blog. You can also check out more amazing blogs on Flutter with Mobikul blogs.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.