Programming Tips - java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

Date: 2024may3 Q. java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. A. But my app didn't directly use PendingIntent. Upgrading play-services-ads fixed it.
implementation 'com.google.android.gms:play-services-ads:22.2.0'