Execution failed for task :processDebugResources [ Cordova / Ionic ]

18,574

Solution 1

Solved by rename every filename who content a special character (image but also html template, javascript file, css)

Solution 2

I had the same problem. The problem in my case occured because i had a "wrong" name for a picture. I had a greek character in one name of a picture. As a start move your folder with the images out of your folder of the app and try to build again.

I dont tell that it will solve your problem but it soved mine.

Hope that it will help you.

Solution 3

I had this because of files in ./node_modules/.bin/ solved by removing node_modules entirely after building.

Solution 4

After hours of trying to figure out my issue,

Another reason why this can happen, if you have the same file name in upper case and in lower case,

for example i had:

Leather.jpg and leather.jpg in the same folder.

Share:
18,574
user1269586
Author by

user1269586

Updated on June 29, 2022

Comments

  • user1269586
    user1269586 almost 2 years

    I have created an application with Cordova and Ionic. I received Application build success on iOS.

    I am trying to build this application on Android (via cordova build android) I have this error :

    :processDebugResources FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
     Execution failed for task ':processDebugResources'.
     > com.android.ide.common.process.ProcessException:      org.gradle.process.internal.ExecException: Process 'command '/Users/me/Library/Android/sdk/build-tools/24.0.0/aapt'' finished with non-zero exit value 1
    
    * 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: 3.937 secs
     Error: Error code 1 for command: /Users/me/Desktop/Développement/Multi-plateforme/myApp/platforms/android/gradlew with args: cdvBuildD
    

    I have downloaded / updated every version of build-tools I can from the Android SDK Manager

    Build-tools

    I also verified that the project doesn't content "node_modules" or "bower_modules" folders in "/www/" directory and the extension + name of every single image in the project.

    Here is my system configuration :

    Cordova CLI: 6.2.0
     Ionic Framework Version: 1.3.1
     Ionic CLI Version: 1.7.15
     Ionic App Lib Version: 0.7.2
     ios-deploy version: 1.8.5 
     ios-sim version: 3.1.1 
     OS: Mac OS X El Capitan
     Node Version: v4.1.2
     Xcode version: Xcode 7.3 Build version 7D175 
    

    Here are the topics I've checked before writing this question :

    I really hope someone will help me ! ;)

  • user1269586
    user1269586 over 7 years
    I renamed every single file in my project and it work again
  • Alexander K. J. Schmidt
    Alexander K. J. Schmidt over 7 years
    This point me in the right direction. I had a file with a german umlaut "ä" and renamed it to "ae". Thanks.
  • Aryeh Armon
    Aryeh Armon over 7 years
    is there anyway to search files for special character? with some regex or something?
  • William Ardila
    William Ardila over 6 years
    @AryehArmon From here went to /<projectName>/platforms/android and execute gradlew assembleDebug --info (for me works gradle without w), my problem was that gradle was outdated, but should show you the files with special characters
  • Mathieu VIALES
    Mathieu VIALES over 6 years
    This should be a comment