[ https://issues.apache.org/jira/browse/CB-12842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090541#comment-16090541 ]
Joe Bowser edited comment on CB-12842 at 7/17/17 8:56 PM: ---------------------------------------------------------- I like [~cjpearson]'s change, we should change this to a docs task. was (Author: bowserj): I like @Connor's change, we should change this to a docs task. > 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 > Environment: cordova-android 6.2.3 > Reporter: Jan Piotrowski > > 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-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org