Building Cordova application : error: unbound prefix

I am trying to build a Cordova application with cordova-background-geolocation-lt

All was OK without the licence.

Now when I try to use the licence by adding the code below in mobile-config.js, i got error: unbound prefix at > Task :app:mergeReleaseResources stage.

App.appendToConfig(`<config-file parent="/manifest/application" target="app/src/main/AndroidManifest.xml"> 
<meta-data  android:name="com.transistorsoft.locationmanager.license" android:value="<Your_licence>" ></meta-data>

In the config.xml, I have the following and the error underlines the meta-date line:

<config-file parent="/manifest/application" target="app/src/main/AndroidManifest.xml">
        <meta-data android:name="com.transistorsoft.locationmanager.license" android:value="9a8c4ea5d9de6ffdc49f43d7a4d75e12cc1f4817036a33bd2b47d542a50da15a" />

In the documentation of the plugin, a namespace must be added as attribute to .

I think the error comes from here but I can’t figure out how to add this attribute to .


I modified directly the builder.js and adding the namespace.
It works!

But it would be better to be able to do it by configuration.

Hey @harry73,

are you aware of this way to configure in your mobile-config.js?

// Example:

<platform name="ios">
  <edit-config target="UIStatusBarHidden" file="*-Info.plist" mode="merge">
  <edit-config target="UIViewControllerBasedStatusBarAppearance" file="*-Info.plist" mode="merge">
  <edit-config target="AllowInlineMediaPlayback" file="*-Info.plist" mode="merge">
  <resource-file target="GoogleService-Info.plist" src="../../../cordova-build-override/GoogleService-Info.plist"/>

<platform name="android">
    <resource-file target="google-services.json" src="../../../cordova-build-override/google-services.json"/>

Hi @paulishca,

Perhaps i missunderstood your reply, I already use App.appendToConfig (see above).

My config.xml file looks like that:

?xml version='1.0' encoding='utf-8'?>
<widget id="fr.myana.saseapp" version="0.9.0" xmlns=""
    <feature name="BackgroundFetch">
        <param name="android-package" value="com.transistorsoft.cordova.backgroundfetch.CDVBackgroundFetch" />


and I do not know how to add namespace (xmlns:android) attribute to the top-level <widget> with App.appendToConfig.


The misunderstanding was totally on my side.

1 Like