I’m facing the above error on my app, developed with React Native and builded with Expo and gradlew. Tried some of the solutions available on internet, like:
dependencies {
// ...
implementation 'androidx.work:work-runtime-ktx:2.7.0'
}
But it doesn´t work…
Tried a bunch of solutions, some displayed on this topic: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified
2
Answers
a few suggestions to help you troubleshoot and resolve the issue:
Ensure that you have the latest version of Expo. Upgrading to the latest Expo version can help ensure compatibility with newer Android versions and dependencies.
Verify that your project’s build.gradle file includes the required configurations for targeting Android S. These configurations usually involve setting the compileSdkVersion and targetSdkVersion to 31 or higher.
Make sure all your dependencies, including React Native and Expo packages, are updated to their latest versions. Check the official documentation and release notes for any specific instructions related to Android S compatibility.
If the error persists, try removing the problematic implementation ‘androidx.work:work-runtime-ktx:2.7.0’ dependency temporarily to see if it allows your app to build successfully. Then, you can investigate alternative solutions or updated versions of the dependency that may resolve the issue.
If none of the above solutions work, it can be helpful to provide the complete error message and any additional relevant code or configurations. This would enable a more specific analysis and assistance in resolving the issue.
If you are using firebase to handle custom/data messages for notifications, please check android source code for any pending intent calls.