I am using react native 64.0.3 version to develop the app. Recently I have shifted my sdk 31. I am facing this issue:
"Targeting S+ (version 31 and above) requires that one of flag_immutable or flag_mutable be specified when creating a PendingIntent. Strongly consider using flag_immutable, only use flag_mutable if some functionality depends on the Pendingment being mutable, e.g. if it needs to be used with inline replies or bubbles"
My build.gradle(android/app):
dependencies {
implementation(project(':react-native-svg')) {
exclude group: "com.android.support", module: "appcompat-v7"
}
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'com.android.support:appcompat-v7:28.0.0'
//noinspection GradleDynamicVersion
// implementation('androidx.work:work-runtime:2.7.1')
implementation "androidx.media:media:1.4.1"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'androidx.appcompat:appcompat:1.7.0-alpha01'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.android.support:multidex:1.0.3'
implementation project(':react-native-view-pdf')
implementation project(':rn-fetch-blob')
implementation project(':react-native-ping')
implementation project(':react-native-gesture-handler')
implementation 'com.facebook.fresco:animated-gif:2.6.0'
debugImplementation("com.facebook.flipper:flipper:0.176.1") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:0.176.1") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:0.176.1") {
exclude group:'com.facebook.flipper'
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}