mhartington / cordova-config-utils

32 stars 5 forks source link

Android Platform Parent syntax error #1

Closed jason-engage closed 9 years ago

jason-engage commented 9 years ago

In your readme example you wrote:

<config-file target="AndroidManifest.xml" parent="/*>

Notice the parent="/* (bad syntax)

I've tried "/", "", and "*", which have all generated errors. I'm wondering what the right syntax is.

By deleting the android part, I was able to get the ios part working well. Let us know how to fix. This script is a time-saver.

dpa99c commented 9 years ago

Correct syntax is <config-file target="AndroidManifest.xml" parent="/*">

dpa99c commented 9 years ago

FYI I was unaware of this repo until just now and have been wrapping the same hook up as a plugin: https://github.com/dpa99c/cordova-custom-config

jason-engage commented 9 years ago

@dpa99c I swear i tried "/*" ! I will retry. thanks

jason-engage commented 9 years ago

@mhartington I still have issues with this. I tried "/*"

/Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/intermediates/res/armv7/debug/xml/config.xml:94: error: Error parsing XML: unbound prefix

FAILED

FAILURE: Build failed with an exception.

jason-engage commented 9 years ago

I have this in the config.xml:

    <config-file parent="/*" target="AndroidManifest.xml" platform="android">
        <uses-permission android:name="com.android.vending.BILLING"/>
        <uses-permission android:name="android.permission.WAKE_LOCK"/>
        <uses-permission android:name="android.permission.VIBRATE"/>
    </config-file>
mhartington commented 9 years ago

Try this...

    <platform name="android">
      <config-file parent="/*" target="AndroidManifest.xml">
        <uses-permission android:name="com.android.vending.BILLING" />
        <uses-permission android:name="android.permission.WAKE_LOCK" />
        <uses-permission android:name="android.permission.VIBRATE" />
      </config-file>
    </platform>
jason-engage commented 9 years ago

I was actually using this:

<platform name="android">
        <config-file parent="/*" target="AndroidManifest.xml" platform="android">
            <uses-permission android:name="com.android.vending.BILLING"/>
            <uses-permission android:name="android.permission.WAKE_LOCK"/>
            <uses-permission android:name="android.permission.VIBRATE"/>
        </config-file>
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png"/>
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png"/>
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png"/>
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png"/>
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png"/>
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png"/>
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png"/>
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png"/>
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png"/>
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png"/>
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png"/>
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png"/>
    </platform>