1

I'm trying to use ant xmltask to preprocess my AndroidManifest.xml in IntelliJ IDEA. My build.xml looks like

<?xml version="1.0" encoding="UTF-8"?>
<project name="codebase">
    <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpath="xmltask.jar"/>
    <target name="main">
        <xmltask source="./AndroidManifest.template.xml" dest="./AndroidManifest1.xml">
            <uncomment path="/manifest/comment()[1]"/>
        </xmltask>
    </target>
</project>

And the AndroidManifest.template.xml looks like

<?xml version="1.0" encoding="utf-8"?>
<manifest
        xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example"
        android:versionCode="1114222"
        android:versionName="2.2.2"
        android:installLocation="auto"
        >

    <!--<uses-permission android:name="com.android.vending.BILLING"/>-->
    <!-- Some more code here -->
</manifest>

So I expect it to uncomment

<uses-permission android:name="com.android.vending.BILLING"/>

string, but when I run it, I get Exception

org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 71; The prefix "android" for attribute "android:name" associated with an element type "uses-permission" is not bound.

And the AndroidManifest1.xml leaves unchanged. What can I do with this?

  • Did you find out how? I have the same problem with inserting xml into the manifest. same unbound error. – tik27 Dec 09 '14 at 02:01

0 Answers0