Programming Tips - Android: mutability of each PendingIntent object is required for all apps

Date: 2024jan4 Q. Android: mutability of each PendingIntent object is required for all apps A. The stack trace (available in Play Console > Production) showed a crash in Firebase with "The mutability of each PendingIntent object is required for all apps targeting Android 12 or newer crash" Forum advice showed how to change how you are creating a PendingIntend but I was not creating any directly. I fixed it my updating the version of play-services-ads-lite:
dependencies { implementation 'com.google.android.gms:play-services-ads-lite:22.6.0' }
That required me to move the declaration of my publisher ID to the manifest.
<application> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-9999999~999999"/> </application>
Notice it expects a tilde (~) rather than a slash which is what it wanted when it was declared elsewhere. Changing these two things got my app going again.