2

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.

  • What went wrong: Execution failed for task ':processDebugResources'.

    com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/desmondlai/Library/Android/sdk/build-tools/23.0.2/aapt package -f --no-crunch -I /Users/desmondlai/Library/Android/sdk/platforms/android-22/android.jar -M /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/res/debug -A /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/assets/debug -m -J /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/generated/source/r/debug -F /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package com.ionicframework.starter -0 apk --output-text-symbols /Users/desmondlai/Desktop/hairCorner/HairProject/platforms/android/build/intermediates/symbols/debug Error Code: 1 Output: 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

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

2
  • maybe try and remove the android platform and then add it back again? Is it a blank project? or have you already started playing around with the code and config files? Commented Jan 13, 2016 at 22:50
  • tried this already ionic platform rm android ionic rm platform rm ios ionic add platform add android ionic add platform add ios I already hv existing project, I succeeded to build the app as apk file BUT failed when I wanna create an updated version. I tried to copy the main directory folder to a new path and start create project again, but the error seems still exist. It seems to be the problem is inside my project. Is this related to the plugins ? I used some Angular modules and lots of Grunt Commented Jan 14, 2016 at 17:04

3 Answers 3

0

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

Generating the project resources fixed the issue for me.

ionic resources 
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

0

delete your icon folder splashscreen folder then follow these commands

sudo npm install ionic-resources -g
ionic resources android

1 Comment

Code only answers are discouraged. Especially when you dont even take the time to properly format your input!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.