Duplicate attribute in config.xml

When trying to build via voltbuilder today I am getting the following error: Parse Error in config.xml: duplicate attribute: line 2, column 160

I have checked my config.xml against a version that I was able to build last week and there are no differences. I have tried building the older version that I know built last week and I’ve tried building from different systems/platforms (windows 10 & mac) and I’m getting the same error everywhere.

Has there been a change to the config.xml that isn’t documented?

Can you post the first 3 lines of your config.xml?

Here’s the whole config.xml

<?xml version="1.0" encoding="UTF-8"?>
-<widget version="{version}" versionCode="19" id="com.nsbasic.{id}" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:android="[http://schemas.android.com/apk/res/android](http://schemas.android.com/apk/res/android)" xmlns="https://www.w3.org/ns/widgets">

<!-- versionCodes: -->

<!-- 18 = 4.4.1 -->

<!-- 19 = 4.4.2 -->



<preference value="{phoneGapVersion}" name="phonegap-version"/>

-<platform name="android">

-<edit-config target="/manifest/application" mode="merge" file="app/src/main/AndroidManifest.xml">

<application android:usesCleartextTraffic="true"/>



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

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

<!-- sample preference specifications -->

<!-- <preference name="autorotate" value="false" readonly="true"/> -->

<!-- <preference name="orientation" value="default" /> -->

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

<!-- Platforms: Customize as needed. -->


<gap:platform name="android"/>

<gap:platform name="ios"/>

<gap:platform name="winphone"/>


<plugin name="cordova-plugin-statusbar" source="npm"/>

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

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

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

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

<!-- Confirmed works with VoltBuilder -->

<allow-navigation href="*"/>

<access origin="*"/>

<allow-intent href="*"/>

<plugin name="cordova-plugin-vibration" spec="3.1.0"/>

<!-- Confirmed works with VoltBuilder -->

<plugin name="cordova-plugin-powermanagement" source="npm"/>

<!-- Confirmed works with VoltBuilder -->

<plugin name="cordova-plugin-wifi" source="npm"/>

<plugin name="cordova-plugin-background-mode" source="npm"/>

<!-- Confirmed works with VoltBuilder -->

<plugin name="cordova-plugin-camera" source="npm" spec="4.1.0"/>

<!-- Confirmed works with VoltBuilder -->

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

<!-- Confirmed works with VoltBuilder -->

-<edit-config target="NSCameraUsageDescription" mode="merge" file="*-Info.plist">

<string>To scan barcodes</string>


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

<!-- Confirmed works with VoltBuilder -->

<plugin name="cordova-plugin-local-notifications-yetisnack" source="npm"/>

<plugin name="cordova-plugin-doze-optimize" source="npm"/>

<plugin name="cordova-plugin-keyboard" source="npm"/>

<!-- Confirmed works with VoltBuilder -->

<plugin name="cordova-plugin-screen-orientation" source="npm"/>

<!-- Confirmed works with VoltBuilder -->

<plugin name="cordova-plugin-inappbrowser" source="npm"/>

<!-- Confirmed works with VoltBuilder -->

<plugin name="cordova-plugin-wifiwizard2" source="npm"/>


I’ve got a pretty good idea what is happening - we’ll get it fixed in the next couple of hours.

OK, give it another try.

A few days ago, we added an enhancement to automatically define the android namespace in config.xml (people forget to sometimes). This worked fine until your project: you define the android namespace, but in a non-standard way. The fix we just did allows for what you’re doing.

That did the trick… thank you.