Capacitor 5, with @capacitor/share@5.0.8 plugin, is crashing the app on Android SDK 34

java.lang.IllegalArgumentException: com.tatacapital.moneyfy: Targeting U+ (version 34 and above) disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons. To retrieve an already existing PendingIntent, use FLAG_NO_CREATE, however, to create a new PendingIntent with an implicit Intent use FLAG_IMMUTABLE.

1 Like

You have to update to Capacitor 6 and @capacitor/share 6.x

There are so many Capacitor plugins we are using, and it will take a lot of time to update them. Can we use the Cordova plugin(@awesome-cordova-plugins/social-sharing) instead?

Well, you need to update to Capacitor 6 in order to officially support SDK 34. If you try to shoehorn SDK 34 with Capacitor 5, you will most likely run into other issues too.

@awesome-cordova-plugins/social-sharing is not a real plugin but a wrapper around a cordova plugin.
I think the plugin it wraps is SocialSharing-PhoneGap-Plugin, which hasn’t been updated for two years, so most likely it won’t work on Android 14.