Skip to content

[BUG] Android - Duplicate intent-filter everytime expo prebuild is runΒ #200

Description

@forabi

πŸ“‹ Describe the bug

Every time I run expo prebuild (without --clean), the AndroidManifest.xml file gets updated with a duplicate entry:

Image

πŸ› οΈ To Reproduce

[
        "expo-share-intent",
        {
          // iOS configuration for receiving contacts
          iosActivationRules: {
            NSExtensionActivationSupportsFileWithMaxCount: 1,
            NSExtensionActivationSupportsText: true,
          },
          iosShareExtensionName: "SmilespaceShareExtension",
          // Android configuration for receiving contacts
          androidIntentFilters: ["text/x-vcard", "text/vcard", "text/plain"],
          androidMainActivityAttributes: {
            "android:launchMode": "singleTask",
          },
        },
      ],

πŸ’» Expected Behavior
No duplicate intent-filters are generated. If the filter already exists, it is skipped the next time prebuild is run.

πŸ“± Screenshots or Videos
If applicable, add screenshots or videos to help explain your problem.
(Drag and drop files or paste screenshots here.)

βš™οΈ Environment Details

Please complete the following information:

  • Expo SDK Version (e.g.: 51) : 54
  • Package version (e.g.: 3.1.1) : 5.1.1
  • Platform target : Android
  • Routing : (e.g.: basic / expo-router / react-navigation): expo-router
  • Using firebase : no
  • Using static build : yes / no
  • Device : simulator / real device
  • Type: local build / expo eas build

For build issue give the output of the following command npx react-native info

πŸ“„ Logs
If possible, paste any relevant logs here (use triple backticks for formatting):

Your logs here
...
DEBUG  expoShareIntent[...] ...
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions