Comment on page
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
To resolve this issue, we have released a feature that detects duplicates of the
uses-permission
tag and automatically unifies them.- 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.