13 Replies Latest reply on Sep 20, 2017 4:53 AM by semihaltntas

    FAILURE: Build failed with an exception.

    mohammadm73101301

      Build Date: 2017-08-24 08:35:15 +0000

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

      PLUGIN OUTPUT

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

      Fetching plugin "cordova-plugin-device@~1.1.6" via npm

      Installing "cordova-plugin-device" at "1.1.6" for android

      Fetching plugin "cordova-plugin-console@~1.0.7" via npm

      Installing "cordova-plugin-console" at "1.0.7" for android

      Fetching plugin "cordova-plugin-splashscreen@~4.0.3" via npm

      Installing "cordova-plugin-splashscreen" at "4.0.3" for android

      Fetching plugin "cordova-plugin-statusbar@~2.2.3" via npm

      Installing "cordova-plugin-statusbar" at "2.2.3" for android

      Fetching plugin "cordova-plugin-dialogs@~1.3.3" via npm

      Installing "cordova-plugin-dialogs" at "1.3.3" for android

      Fetching plugin "cordova-plugin-inappbrowser@~1.7.1" via npm

      Installing "cordova-plugin-inappbrowser" at "1.7.1" for android

      Fetching plugin "cordova-plugin-geolocation@~2.4.3" via npm

      Installing "cordova-plugin-geolocation" at "2.4.3" for android

      Fetching plugin "cordova-plugin-compat@^1.0.0" via npm

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

      Fetching plugin "ionic-plugin-keyboard@~2.2.1" via npm

      Installing "ionic-plugin-keyboard" at "2.2.1" for android

      Fetching plugin "cordova-plugin-barcodescanner@^0.7.2" via npm

      Installing "cordova-plugin-barcodescanner" at "0.7.2" for android

      Plugin dependency "cordova-plugin-compat@1.1.0" already fetched, using that version.

      Dependent plugin "cordova-plugin-compat" already installed on android.

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

      COMPILE OUTPUT

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

      Subproject Path: CordovaLib

      Configuration on demand is an incubating feature.

      Incremental java compilation is an incubating feature.

      [Fatal Error] :13:352: The value of the attribute "prefix="xmlns",localpart="android",rawname="xmlns:android"" is invalid. Prefixed namespace bindings may not be empty.

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      A problem occurred configuring root project 'project'.

      > Exception while parsing the supplied manifest file /project/AndroidManifest.xml

       

      * 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: 1.236 secs

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

      [Fatal Error] :13:352: The value of the attribute "prefix="xmlns",localpart="android",rawname="xmlns:android"" is invalid. Prefixed namespace bindings may not be empty.

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      A problem occurred configuring root project 'project'.

      > Exception while parsing the supplied manifest file /project/AndroidManifest.xml

       

      * 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)

        • 1. Re: FAILURE: Build failed with an exception.
          kerrishotts Adobe Employee

          Are you using PhoneGap Build?

          • 2. Re: FAILURE: Build failed with an exception.
            mohammadm73101301 Level 1

            the probem was in cordova-plugin-barcodescanner    i  forgot some config in config.xml but to find where is the problem it take long time

            thanks

            • 3. Re: FAILURE: Build failed with an exception.
              tanerochris

              HI, I'm having the same problem. How did you go about it ? I added

              <config-file target="AndroidManifest.xml" parent="/*" mode="merge">
                <uses-permission android:name="android.permission.CAMERA" />
                <uses-feature android:name="android.hardware.camera" />
                <uses-feature android:name="android.hardware.camera.autofocus" />
              </config-file>

               

              in config ,but it doesn't solve the problem. Thanks

              • 5. Re: FAILURE: Build failed with an exception.
                mohammadm73101301 Level 1

                cordova barcode scanner need special configs in config.xml i did it and the problem solved

                • 6. Re: FAILURE: Build failed with an exception.
                  driverd71202277

                  Can you tell us how please!

                  • 7. Re: FAILURE: Build failed with an exception.
                    accounto56613983 Level 1

                    I use the following in config.xml and still get the problem. Strange that it was working on PGB until last week....

                     

                    <plugin name="cordova-plugin-barcodescanner" spec="0.7.0">

                            <variable name="CAMERA_USAGE_DESCRIPTION" value="This app requires access to the camera to scan the App URL."/>

                    </plugin>

                     

                    Please indicate what exact configs worked for you and on what cli of PGB?

                    • 8. Re: FAILURE: Build failed with an exception.
                      mohammadm73101301 Level 1

                      i think this is the first thing required

                      <plugin name="cordova-plugin-camera" spec="~2.1.1" />

                       

                      second thing if not work  use this plugin

                       

                      phonegap plugin add phonegap-plugin-barcodescanner

                       

                      GitHub - phonegap/phonegap-plugin-barcodescanner: cross-platform BarcodeScanner for Cordova / PhoneGap

                       

                      try this

                      i put every thing its same plugin

                       

                      https://www.sitepoint.com/scanning-qr-code-cordova/

                      • 9. Re: FAILURE: Build failed with an exception.
                        mohammadm73101301 Level 1

                        if  not work paste your config.xml

                        • 10. Re: FAILURE: Build failed with an exception.
                          accounto56613983 Level 1

                          Thanks for the feedback mohammadm73101301, but changing my version from "0.7.0" to "0.7.1" solved the problem. Version "0.7.2" also gives the same problem.

                          • 11. Re: FAILURE: Build failed with an exception.
                            mohammadm73101301 Level 1

                            you are welcome  i am not expert in this its first application i faced problem in phonegap building then found all the plugin i used is the default plugin  in phonegap building but the barcodescanner is not

                            so going to find the solution i founded phonegap barcode scanner  why not use the plugin for phonegap i said in mined but follow steps this time i found some configs i forgot to do it in cordova plugin

                            its work with me

                            i did not change any thing in my code its same plugin but different  setting in config.xml (not sure)

                            • 12. Re: FAILURE: Build failed with an exception.
                              alexanderz22245786

                              This is how I've solved it.

                              1. Open plugins/cordova-plugin-barcode-scanner/plugin.xml and delete all records xmlns:android=""

                              2. Open  platforms/android/android.json and delete all xmlns:android=\"\"

                              3. Do the same in platforms/android/AndroidManifest.xml

                               

                              xmlns:android can't be empty like error tells us:

                               

                              The value of the attribute "prefix="xmlns",localpart="android",rawname="xmlns:android"" is invalid. Prefixed namespace bindings may not be empty.

                              • 13. Re: FAILURE: Build failed with an exception.
                                semihaltntas

                                Same Problem Help me Pls

                                 

                                <?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.kerzzpos.mobileplus"

                                version = "3.1.1">

                                 

                                <name>Kerzz POS Plus</name>

                                       

                                <description>

                                Demo App

                                </description>

                                 

                                 

                                <author href="http://www.kerzzpos.com"

                                email="demo@gmail.com">

                                Demo App

                                </author>

                                <content src="index.html" />

                                <access origin="*" /> 

                                   <plugin name="phonegap-plugin-barcodescanner" source="npm"/>

                                   <plugin name="cordova-plugin-statusbar" spec="~2.2.3" />

                                   <plugin name="cordova-plugin-device" spec="~1.1.4" source="npm" />

                                <preference name="SplashScreenDelay" value="6000" />

                                <preference name="StatusBarOverlaysWebView" value="false"/>

                                <preference name="StatusBarBackgroundColor" value="#000000"/>

                                <preference name="StatusBarStyle" value="blackopaque" />

                                <preference name="Fullscreen" value="true" />

                                <preference name="AndroidLaunchMode" value="singleInstance" />

                                      <preference name="DisallowOverscroll" value="true" />

                                <preference name="KeepRunning" value="true" />

                                <preference name="auto-hide-splash-screen" value="false"/>

                                 

                                    <preference name="phonegap-version"           value="cli-6.5.0" />    

                                    <preference name="permissions"                value="none"/>          

                                    <preference name="orientation"                value="portrait" />     

                                    <preference name="target-device"              value="universal" />    

                                    <preference name="fullscreen"                 value="true" />         

                                    <preference name="webviewbounce"              value="true" />         

                                    <preference name="prerendered-icon"           value="true" />      

                                    <preference name="stay-in-webview"            value="true" />         

                                    <preference name="detect-data-types"          value="true" />         

                                    <preference name="exit-on-suspend"            value="false" />        

                                    <preference name="show-splash-screen-spinner" value="true" />         

                                    <preference name="auto-hide-splash-screen"    value="true" />         

                                    <preference name="disable-cursor"             value="false" />        

                                    <preference name="android-minSdkVersion"      value="12"/>            

                                    <preference name="android-installLocation"    value="auto" />         

                                 

                                 

                                 

                                 

                                 

                                 

                                    <!-- iPhone 6 / 6+ -->

                                    <icon src="images/appico/icon-60@3x.png" gap:platform="ios" width="180" height="180" />

                                 

                                 

                                    <!-- iPhone / iPod Touch  -->

                                    <icon src="images/appico/icon-60.png" gap:platform="ios" width="60" height="60" />

                                    <icon src="images/appico/icon-60@2x.png" gap:platform="ios" width="120" height="120" />

                                 

                                 

                                    <!-- iPad -->

                                    <icon src="images/appico/icon-76.png" gap:platform="ios" width="76" height="76" />

                                    <icon src="images/appico/icon-76@2x.png" gap:platform="ios" width="152" height="152" />

                                 

                                 

                                    <!-- Settings Icon -->

                                    <icon src="images/appico/icon-small.png" gap:platform="ios" width="29" height="29" />

                                    <icon src="images/appico/icon-small@2x.png" gap:platform="ios" width="58" height="58" />

                                 

                                 

                                    <!-- Spotlight Icon -->

                                    <icon src="images/appico/icon-40.png" gap:platform="ios" width="40" height="40" />

                                    <icon src="images/appico/icon-40@2x.png" gap:platform="ios" width="80" height="80" />

                                 

                                 

                                 

                                 

                                    <!-- iPhone / iPod Touch -->

                                    <icon src="images/appico/icon.png" gap:platform="ios" width="57" height="57" />

                                    <icon src="images/appico/icon@2x.png" gap:platform="ios" width="114" height="114" />

                                 

                                 

                                    <!-- iPad -->

                                    <icon src="images/appico/icon-72.png" gap:platform="ios" width="72" height="72" />

                                    <icon src="images/appico/icon-72@2x.png" gap:platform="ios" width="144" height="144" />

                                 

                                 

                                    <!-- iPhone Spotlight and Settings Icon -->

                                    <icon src="images/appico/icon-small.png" gap:platform="ios" width="29" height="29" />

                                    <icon src="images/appico/icon-small@2x.png" gap:platform="ios" width="58" height="58" />

                                 

                                 

                                    <!-- iPad Spotlight and Settings Icon -->

                                    <icon src="images/appico/icon-50.png" gap:platform="ios" width="50" height="50" />

                                    <icon src="images/appico/icon-50@2x.png" gap:platform="ios" width="100" height="100" />

                                 

                                    <icon src="images/appico/icon.png" />

                                 

                                    <icon src="images/appico/icon.png" gap:platform="android" gap:density="ldpi" />

                                    <icon src="images/appico/icon.png" gap:platform="android" gap:density="mdpi" />

                                    <icon src="images/appico/icon.png" gap:platform="android" gap:density="hdpi" />

                                    <icon src="images/appico/icon.png" gap:platform="android" gap:density="xhdpi" />

                                  <gap:splash src="images/appico/Splash.png"  />

                                 

                                  <!-- iPhone and iPod touch -->

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="320" height="480" />

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="640" height="960" />

                                  <gap:splash gap:platform="ios" height="480" src="images/ios/Default.png" width="320" />

                                  <gap:splash gap:platform="ios" height="960" src="images/ios/Default@2x.png" width="640 " />

                                 

                                 

                                  <!-- iPhone 5 / iPod Touch (5th Generation) -->

                                <!--  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="640" height="1136" /> -->

                                <gap:splash gap:platform="ios" height="1136" src="images/ios/Default-568h@2x.png" width="640" />

                                 

                                  <!-- iPhone 6 -->

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="750" height="1334" />

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="1242" height="2208" />

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="2208" height="1242" />

                                  <gap:splash gap:platform="ios" height="1334" src="images/ios/Default-667h@2x.png" width="750" />

                                  <gap:splash gap:platform="ios" height="2208" src="images/ios/Default-736h@3x.png" width="1242" />

                                 

                                  <!-- iPad -->

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="768" height="1024" />

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="1024" height="768" />

                                 

                                  <!-- Retina iPad -->

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="1536" height="2048" />

                                  <gap:splash src="images/appico/Splash.png" gap:platform="ios" width="2048" height="1536" />

                                 

                                  <gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance" overwrite="true">

                                    <false/>

                                </gap:config-file>

                                 

                                <access origin="*" />

                                <!-- <plugin name="cordova-plugin-whitelist"  source="npm" version="5.4.0" /> -->

                                <plugin name="cordova-plugin-whitelist" spec="~1.3.1" />

                                <allow-intent href="*" />

                                <allow-navigation href="*" />

                                 

                                </widget>