I am using Mac Yosemite. Getting the following failure on running a build for android platform :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/sairamk/Development/android-sdk-macosx/build-tools/22.0.1/aapt package -f --no-crunch -I /Users/sairamk/Development/android-sdk-macosx/platforms/android-22/android.jar -M /Users/sairamk/projects/dummy_app/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /Users/sairamk/projects/dummy_app/platforms/android/build/intermediates/res/debug -A /Users/sairamk/projects/dummy_app/platforms/android/build/intermediates/assets/debug -m -J /Users/sairamk/projects/dummy_app/platforms/android/build/generated/source/r/debug -F /Users/sairamk/projects/dummy_app/platforms/android/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package com.ionicframework.bcgsandbox553389 -0 apk --output-text-symbols /Users/sairamk/projects/dummy_app/platforms/android/build/intermediates/symbols/debug
Error Code:
1
Output:
/Users/sairamk/projects/dummy_app/platforms/android/build/intermediates/res/debug/xml/config.xml:59: error: Error parsing XML: unbound prefix
The build runs perfectly fine for IOS. I have installed android SDK and configured ANDROID_HOME and ANDROID_SDK_ROOT system variables.
Also tried removing the platform and adding it again, to have a clean platform folder using :
ionic platform remove android
ionic platform add android
But no good.
Android SDK build tool versions that I have installed - 19.1,20,21.1.2 and 22.0.1
AndroidManifest.xml preference :
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
This issue gets resolved by adding xml namespace for phonegap (xmlns:gap="http://phonegap.com/ns/1.0") to config.xml
After adding :
Hope it helps someone facing similar issue.