Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
638 views
in Technique[技术] by (71.8m points)

cordova - ionic build android failure - Execution failed for task processDebugResources

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" />
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

To get more info to debug this go in to the ./platforms/android/ folder and run:

Mac users:

gradlew --info build clean

Linux users (thanks Pierre):

./gradlew --info build clean

Windows users:

gradlew.bat --info build clean

This gives you a lot more detail.

My issue was solved this way, found some files that where incorrectly dropped into the project folder with spaces in the file names.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...