I recently updated my app to target API 31 and have noticed a new crash being reported in the Google Play Console that makes no sense to me.
The crash caused by exception.class.missing._Unknown_: Strongly consider using FLAG_IMMUTABLE...
for which there are a number of answers on SO and elsewhere, however from what I have read this crash should be related to use of PendingIntent
only.
The crash reports make sense in that I have only seen the crash reported on Android 12 (API 31) as this is where the explicit IMMUTABLE or MUTABLE requirement was introduced, but I have searched the whole of my project and cannot find any use of PendingIntent
.
The timing of the crashes appears to tie in with an FCM push notification I sent, which again ties in with the crash coming from PendingIntent
, but if I cannot find that in my source then how can I explicitly set FLAG_IMMUTABLE
?
My project dependencies are as below:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.4.0-beta01'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
// billing for in-app purchases
implementation 'com.android.billingclient:billing:3.0.2'
// For in-app review flow
implementation 'com.google.android.play:core:1.10.2'
// Import the Firebase BoM
implementation platform('com.google.firebase:firebase-bom:26.1.1')
implementation 'com.google.firebase:firebase-messaging'
}