The prefix "tools" for attribute "tools:node" associated with an element type "uses-permission" is not bound

1.3k views Asked by At

I'm trying to build my Apache Cordova app for Google Play and I'm facing with this error although I included xlmns:tools. I've tried all solutions in the Internet but still get this error! Where is the problem?

My code:

<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    id="com.mypackage" versionCode="1.8.4" version="1.8.4">  

 <config-file target="AndroidManifest.xml" parent="/manifest">
...     
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" 
      tools:node="remove"/>
...
</config-file>
</widgets>
1

There are 1 answers

0
fbcyborg On

I faced the same issue using the cordova-custom-config plugin for Ionic and solved adding the following xml tag enclosed within the platform tag:

<custom-preference name="android-manifest/@xmlns:tools" value="http://schemas.android.com/tools" />

Basically, the above code adds a xmlns to the manifest node for the AndroidManifest.xml file and the error will disappear.