skip to Main Content

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


  1. a few suggestions to help you troubleshoot and resolve the issue:

    1. 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.

    2. 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.

    3. 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.

    4. 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.

    5. 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.

    Login or Signup to reply.
  2. If you are using firebase to handle custom/data messages for notifications, please check android source code for any pending intent calls.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search