Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified

If using java or react-native then paste this inside app/build.gradle

dependencies {
  // ...
  implementation 'androidx.work:work-runtime:2.7.1'
}

If using Kotlin then use this

dependencies {
  // ...
  implementation 'androidx.work:work-runtime-ktx:2.7.0'
}

and if anybody still facing the crash issue for android 12 then make sure you add following in AndroidMenifest.xml

 <activity 
   ...
   android:exported="true" // in most cases it is true but based on requirements it can be false also   
>   


   // If using react-native push notifications then make sure to add into it also

 <receiver   
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver" android:exported="true">
 
   //  Similarly
 
 <service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:exported="true">

Leave a Comment