Desmond Lai
Desmond Lai

Reputation: 35

Ionic: execution failed for task ' processdebugresources'

All the things happened after I made several commands for the ionic App with ngCordova - ionic start "App Project Name" - ionic platform add android - ionic build android

:processDebugResources      Unable to add '/Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/assets/debug/www/node_modules/try-thread-sleep/node_modules/thread-sleep/node_modules/node-pre-gyp/node_modules/tar-pack/test/fixtures/packed.tar.gz': file already in archive (try '-u'?)

ERROR: unable to process assets while packaging '/Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/res/resources-debug.ap_' ERROR: packaging of '/Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/res/resources-debug.ap_' failed FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 45.169 secs

/Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/cordova/node_modules/q/q.js:126 throw e; ^ Error code 1 for command: /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build.gradle,-Dorg.gradle.daemon=true ERROR building one of the platforms: Error: /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/cordova/build: Command failed with exit code 1 You may not have the required environment or OS to build this project Error: /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/cordova/build: Command failed with exit code 1

Upvotes: 2

Views: 5439

Answers (3)

Jagan
Jagan

Reputation: 111

delete your icon folder splashscreen folder then follow these commands

sudo npm install ionic-resources -g
ionic resources android

Upvotes: 0

Paradise
Paradise

Reputation: 568

Add xml namespace xmlns:gap="http://phonegap.com/ns/1.0" to your config.xml

also, if you are using linux you must do "sudo chmod 755 gradlew" before you do the "./gradlew clean" to make sure it is executable

Upvotes: 0

bamse
bamse

Reputation: 4373

Add/remove android didn't fix the problem for me either.

Generating the project resources fixed the issue for me.

ionic resources 

Upvotes: 0

Related Questions