Closed jason-engage closed 9 years ago
Correct syntax is <config-file target="AndroidManifest.xml" parent="/*">
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
@dpa99c I swear i tried "/*" ! I will retry. thanks
@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.
com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/jayshaw/Library/Android/sdk/build-tools/23.0.1/aapt package -f --no-crunch -I /Users/jayshaw/Library/Android/sdk/platforms/android-22/android.jar -M /Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/intermediates/manifests/full/armv7/debug/AndroidManifest.xml -S /Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/intermediates/res/armv7/debug -A /Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/intermediates/assets/armv7/debug -m -J /Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/generated/source/r/armv7/debug -F /Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/intermediates/res/resources-armv7-debug.ap_ --debug-mode --custom-package com.videofreakapps.boxing -0 apk --output-text-symbols /Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/intermediates/symbols/armv7/debug Error Code: 1 Output: /Volumes/MEDIA320/VideoFreak/vfboxing/platforms/android/build/intermediates/res/armv7/debug/xml/config.xml:94: error: Error parsing XML: unbound prefix
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>
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>
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>
In your readme example you wrote:
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.