# Plugin uses-permission Tag Deduplication Feature

In the latest versions of Cordova plugins, especially `cordova-plugin-media-capture` and `cordova-plugin-camera`, changes have been made to the `android:maxSdkVersion` attribute. This has increased the potential for duplication errors in the `AndroidManifest.xml` settings when combining multiple plugins.

Specifically, the following build error was occurring: (The example below is a case where the `WRITE_EXTERNAL_STORAGE` permission is duplicated.)

```
/tmp/download/platforms/android/app/src/main/AndroidManifest.xml:14:5-108 Error:
 Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:14:5-108 duplicated with element declared at AndroidManifest.xml:13:5-108
```

### **Feature Details**

To resolve this issue, we have released a feature that detects duplicates of the `uses-permission` tag and automatically unifies them.

### **How to Use**

1. Open your project.
2. Click on "Build" in the header menu, and select "Configure Build Environment" from the list.
3. Move to the Android environment settings page and look for the "Remove Duplicate Permissions" option.
4. Enable the "Remove Duplicate Permissions" option and save the settings.

With this, the function to automatically resolve duplicates of the `uses-permission` tag will be enabled for the next build.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://en.docs.monaca.io/release_notes/plugin-uses-permission-tag-deduplication-feature.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
