1 Reply Latest reply on Dec 14, 2016 7:13 AM by kerrishotts

    Build issue when adding plugin

    svantej81806167 Level 1

      I am trying to build an app including the two plugins called cordova-plugin-qrscanner and cordova-plugin-camera-preview. I started out by including the cordova-plugin-qrscanner and the app worked fine until I added cordova-plugin-camera-preview in my config.xml. The error message I received after buiilding the app can be seen below and the app-id is 2395740. Thanks in advance.

       

      Build Date: 2016-12-14 11:28:22 +0000

      --------------------------------------------------------------------------------

      PLUGIN OUTPUT

      --------------------------------------------------------------------------------

      Fetching plugin "cordova-plugin-qrscanner" via npm

      Installing "cordova-plugin-qrscanner" at "2.4.0" for android

      Fetching plugin "cordova-plugin-compat" via npm

      Installing "cordova-plugin-compat" at "1.1.0" for android

      Fetching plugin "cordova-plugin-camera-preview" via npm

      Installing "com.mbppower.camerapreview" at "0.0.8" for android

      --------------------------------------------------------------------------------

      COMPILE OUTPUT

      --------------------------------------------------------------------------------

      Configuration on demand is an incubating feature.

      Incremental java compilation is an incubating feature.

      :preBuild UP-TO-DATE

      :preDebugBuild UP-TO-DATE

      :checkDebugManifest

      :preReleaseBuild UP-TO-DATE

      :CordovaLib:preBuild UP-TO-DATE

      :CordovaLib:preDebugBuild UP-TO-DATE

      :CordovaLib:compileDebugNdk UP-TO-DATE

      :CordovaLib:compileLint

      :CordovaLib:copyDebugLint UP-TO-DATE

      :CordovaLib:mergeDebugProguardFiles

      :CordovaLib:packageDebugRenderscript UP-TO-DATE

      :CordovaLib:checkDebugManifest

      :CordovaLib:prepareDebugDependencies

      :CordovaLib:compileDebugRenderscript

      :CordovaLib:generateDebugResValues

      :CordovaLib:generateDebugResources

      :CordovaLib:packageDebugResources

      :CordovaLib:compileDebugAidl

      :CordovaLib:generateDebugBuildConfig

      :CordovaLib:mergeDebugShaders

      :CordovaLib:compileDebugShaders

      :CordovaLib:generateDebugAssets

      :CordovaLib:mergeDebugAssets

      :CordovaLib:processDebugManifest

      :CordovaLib:processDebugResources

      :CordovaLib:generateDebugSources

      :CordovaLib:incrementalDebugJavaCompilationSafeguard

      :CordovaLib:compileDebugJavaWithJavac

      :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      :CordovaLib:processDebugJavaRes UP-TO-DATE

      :CordovaLib:transformResourcesWithMergeJavaResForDebug

      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

      :CordovaLib:mergeDebugJniLibFolders

      :CordovaLib:transformNative_libsWithMergeJniLibsForDebug

      :CordovaLib:transformNative_libsWithSyncJniLibsForDebug

      :CordovaLib:bundleDebug

      :CordovaLib:preReleaseBuild UP-TO-DATE

      :CordovaLib:compileReleaseNdk UP-TO-DATE

      :CordovaLib:copyReleaseLint UP-TO-DATE

      :CordovaLib:mergeReleaseProguardFiles

      :CordovaLib:packageReleaseRenderscript UP-TO-DATE

      :CordovaLib:checkReleaseManifest

      :CordovaLib:prepareReleaseDependencies

      :CordovaLib:compileReleaseRenderscript

      :CordovaLib:generateReleaseResValues

      :CordovaLib:generateReleaseResources

      :CordovaLib:packageReleaseResources

      :CordovaLib:compileReleaseAidl

      :CordovaLib:generateReleaseBuildConfig

      :CordovaLib:mergeReleaseShaders

      :CordovaLib:compileReleaseShaders

      :CordovaLib:generateReleaseAssets

      :CordovaLib:mergeReleaseAssets

      :CordovaLib:processReleaseManifest

      :CordovaLib:processReleaseResources

      :CordovaLib:generateReleaseSources

      :CordovaLib:incrementalReleaseJavaCompilationSafeguard

      :CordovaLib:compileReleaseJavaWithJavac

      :CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      :CordovaLib:processReleaseJavaRes UP-TO-DATE

      :CordovaLib:transformResourcesWithMergeJavaResForRelease

      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease

      :CordovaLib:mergeReleaseJniLibFolders

      :CordovaLib:transformNative_libsWithMergeJniLibsForRelease

      :CordovaLib:transformNative_libsWithSyncJniLibsForRelease

      :CordovaLib:bundleRelease

      :prepareComAndroidSupportAppcompatV72310Library

      :prepareComAndroidSupportSupportV42310Library

      :prepareComJourneyappsZxingAndroidEmbedded330Library

      :prepareProjectCordovaLibUnspecifiedDebugLibrary

      :prepareDebugDependencies

      :compileDebugAidl

      :compileDebugRenderscript

      :generateDebugBuildConfig

      :mergeDebugShaders

      :compileDebugShaders

      :generateDebugAssets

      :mergeDebugAssets

      :generateDebugResValues

      :generateDebugResources

      :mergeDebugResources

      :processDebugManifest/project/AndroidManifest.xml:19:5-60 Error:

      Element uses-feature#android.hardware.camera at AndroidManifest.xml:19:5-60 duplicated with element declared at AndroidManifest.xml:17:5-85

      /project/AndroidManifest.xml:21:5-65 Error:

      Element uses-permission#android.permission.CAMERA at AndroidManifest.xml:21:5-65 duplicated with element declared at AndroidManifest.xml:16:5-90

      /project/AndroidManifest.xml Error:

      Validation failed, exiting

       

       

      See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

       

      :processDebugManifest FAILED

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':processDebugManifest'.

      > 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.

       

      BUILD FAILED

       

      Total time: 2.246 secs

      Error: /project/gradlew: Command failed with exit code 1 Error output:

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      /project/AndroidManifest.xml:19:5-60 Error:

      Element uses-feature#android.hardware.camera at AndroidManifest.xml:19:5-60 duplicated with element declared at AndroidManifest.xml:17:5-85

      /project/AndroidManifest.xml:21:5-65 Error:

      Element uses-permission#android.permission.CAMERA at AndroidManifest.xml:21:5-65 duplicated with element declared at AndroidManifest.xml:16:5-90

      /project/AndroidManifest.xml Error:

      Validation failed, exiting

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':processDebugManifest'.

      > 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.

        at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)

        at emitTwo (events.js:106:13)

        at ChildProcess.emit (events.js:191:7)

        at maybeClose (internal/child_process.js:877:16)

        at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

       

       

      <------------------>

      My config.xml:

       

      <?xml version="1.0" encoding="UTF-8" ?>

      <widget xmlns = "http://www.w3.org/ns/widgets"

        xmlns:gap = "http://phonegap.com/ns/1.0"

        id = "com.cent21.example"

        versionCode ="1"

        version = "1.0.0">

          <preference name="android-targetSdkVersion" value="14" />

        <gap:config-file platform="ios" parent="CFBundleVersion">

        <string>1.0.0</string>

        </gap:config-file>

       

       

        <name>Example</name>

       

       

        <description>

        </description>

       

       

        <author href="https://www.21st.se" email="support@21st.se">

        21st Century Mobile

        </author>

          <gap:plugin name="cordova-plugin-qrscanner" source="npm"/>

        <gap:plugin name="cordova-plugin-camera-preview" source="npm"/>

        <gap:platform name="android" />

        <gap:platform name="ios" />

      </widget>