Home > Net >  Targeting S (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE although I&#
Targeting S (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE although I&#

Time:07-15

I have already found similar answers for this but nothing work with my problem as I am getting this exception as-

Targeting S (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 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.

But this contains a condition as - I am not using any PendingIntent in my application . So its obvious that I cannot change the format of using it. I have these firebase dependencies-

implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'com.google.firebase:firebase-core:21.0.0'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.google.firebase:firebase-iid:21.1.0' // add this

Can anyone please help!! what should I do for Android 12 simply API calling Using retrofit and observable and observers in presenter layer

CodePudding user response:

But this contains a condition as - I am not using any PendingIntent in my application .

Something in your app is using a PendingIntent. It might be from a library. The full stack trace should give you more details.

So its obvious that I cannot change the format of using it.

You would change the format by using an updated version of the library. For example, com.google.firebase:firebase-messaging has a 23.0.6 patch version which might address the problem. If you cannot identify the specific library to update from the stack trace, make sure all of your libraries are up to date.

CodePudding user response:

Thanks for giving me ideas, its all about the libraries which was conflicting somewhere. The library in my case was -

debugImplementation 'com.readystatesoftware.chuck:library:1.1.0

ChuckInterceptor . Once I commented it, it works fine!!

  • Related