You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2017/12/19 17:48:01 UTC

[jira] [Updated] (CB-12842) Two plugins with same provider make Android build crash

     [ https://issues.apache.org/jira/browse/CB-12842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-12842:
----------------------------
    Labels:   (was: android-next)

> Two plugins with same provider make Android build crash
> -------------------------------------------------------
>
>                 Key: CB-12842
>                 URL: https://issues.apache.org/jira/browse/CB-12842
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-android, cordova-docs
>         Environment: cordova-android 6.2.3
>            Reporter: Jan Piotrowski (Sujan)
>
> Installing two plugins (in the example https://github.com/apache/cordova-plugin-camera and https://github.com/sitewaerts/cordova-plugin-document-viewer) can create something like this:
> {code}
>         <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
>             <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
>         </provider>
>         <provider android:authorities="io.ionic.conferenceapp.DocumentViewerPlugin.fileprovider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
>             <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/documentviewer_file_paths" />
>         </provider>
> {code}
> This causes the build to fail like so:
> {code}
> ionic cordova run android
> UP-TO-DATE
> :generateArmv7DebugResources UP-TO-DATE
> :mergeArmv7DebugResources
>  UP-TO-DATE
> :processArmv7DebugManifest
> C:\Users\mohan\Documents\PrimusGIT\MobileApps\Demo\platforms\android\AndroidManifest.xml:16:9-18:20 Error:
>         Element provider#android.support.v4.content.FileProvider at AndroidManifest.xml:16:9-18:20 duplicated with element declared at AndroidManifest.xml:13:9-15:20
> See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
> :processArmv7DebugManifest FAILED
> C:\Users\mohan\Documents\PrimusGIT\MobileApps\Demo\platforms\android\AndroidManifest.xml Error:
>         Validation failed, exiting
> BUILD FAILED
> Total time: 27.006 secs
> FAILURE: Build failed with an exception.
> * What went wrong:
> Execution failed for task ':processArmv7DebugManifest'.
> > Manifest merger failed with multiple errors, see logs
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> Error: cmd: Command failed with exit code 1 Error output:
> C:\Users\mohan\Documents\PrimusGIT\MobileApps\Demo\platforms\android\AndroidManifest.xml:16:9-18:20 Error:
>         Element provider#android.support.v4.content.FileProvider at AndroidManifest.xml:16:9-18:20 duplicated with element declared at AndroidManifest.xml:13:9-15:20
> C:\Users\mohan\Documents\PrimusGIT\MobileApps\Demo\platforms\android\AndroidManifest.xml Error:
>         Validation failed, exiting
> FAILURE: Build failed with an exception.
> * What went wrong:
> Execution failed for task ':processArmv7DebugManifest'.
> > Manifest merger failed with multiple errors, see logs
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> [ERROR] Cordova encountered an error.
>         You may get more insight by running the Cordova command above directly.
> [ERROR] An error occurred while running cordova run android (exit code 1).
> {code}
> How should this be handled?
> Forum topic where the problem originated:
> https://forum.ionicframework.com/t/ionic-plugin-document-viewer-creating-android-manifest-merger-issue-in-build/91297



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org