# FAILURE: Build failed with an exception Execution failed for task ':processDebugResources'

**URL:** <https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281>\
**Category:** ionic-v3\
**Created:** [October 28, 2017, 9:59am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281 "2017-10-28T09:59:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 28, 2017, 9:59am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/1 "2017-10-28T09:59:04Z")

</div>

I have this problem when trying to run my application on my android

> dlew: Command failed with exit code 1 Error output:  
> ERROR: In FontFamilyFont, unable to find attribute android:font  
> ERROR: In FontFamilyFont, unable to find attribute android:fontStyle  
> ERROR: In FontFamilyFont, unable to find attribute android:fontWeight

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ‘:processDebugResources’.

> com.android.ide.common.process.ProcessException: Failed to execute aapt

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

---

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 28, 2017, 10:05am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/2 "2017-10-28T10:05:39Z")

</div>

And now I get this error “Error: spawn EACCES”

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 28, 2017, 10:42am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/3 "2017-10-28T10:42:53Z")

</div>

First error: [Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. \> com.android.ide.common.process.ProcessException: Failed to execute aapt](https://forum.ionicframework.com/t/android-build-broken-after-gradle-dependencies-update-execution-failed-for-task-processdebugresources-com-android-ide-common-process-processexception-failed-to-execute-aapt/109982)  
Second error: [Android Build Error (EACCES)](https://forum.ionicframework.com/t/android-build-error-eacces/110001)

---

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 28, 2017, 10:55am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/4 "2017-10-28T10:55:22Z")

</div>

So this is my info

Your system information:

Cordova CLI: 7.0.0  
Ionic Framework Version: 2.0.0-rc.5  
Ionic CLI Version: 2.2.3  
Ionic App Lib Version: 2.2.1  
Ionic App Scripts Version: 1.0.0  
ios-deploy version: Not installed  
ios-sim version: 5.0.13  
OS: macOS Sierra  
Node Version: v7.10.0  
Xcode version: Xcode 8.3.3 Build version 8E3004b

Could you build before?  
Can you build a new project created with ionic start?  
yes to both question  
And Android Studio SDK tool: 26.0.2 and API 26

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 28, 2017, 11:07am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/5 "2017-10-28T11:07:48Z")

</div>

> [@Nouf](#):
>
> Cordova CLI: 7.0.0
> 
> Ionic Framework Version: 2.0.0-rc.5
> 
> Ionic CLI Version: 2.2.3
> 
> Ionic App Lib Version: 2.2.1
> 
> Ionic App Scripts Version: 1.0.0

This is all so old that I am surprise anything works at all.  
Update.

---

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 28, 2017, 11:10am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/6 "2017-10-28T11:10:25Z")

</div>

> [@Sujan12](#):
>
> Update

my next question going to shock you but I do not know how  
is this sudo npm update -g cordova ionic the right command ?

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 28, 2017, 11:25am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/7 "2017-10-28T11:25:49Z")

</div>

This will update Cordova and Ionic CLI.  
Framework and app-scripts are in package.json, local to the project.

---

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 28, 2017, 11:41am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/8 "2017-10-28T11:41:59Z")

</div>

olay I have update Cordova and Ionic CLI

> local packages:

```
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.8.0

```

System:

```
ios-sim : 5.0.13 
Node : v6.11.5
npm : 3.10.10 
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b 

```

Environment Variables:

```
ANDROID_HOME : not set

```

Misc:

```
backend : pro

```

> Requirements check results for android:

Java JDK: installed 1.8.0

Android SDK: installed true  
Android target: installed android-26,android-25,android-24,android-22,android-21

Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle

but when I try ionic cordova run android I still get  
the error "JAVA\_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0\_101.jdk/Contents/Home  
Error: spawn EACCES

[ERROR] An error occurred while running cordova run android (exit code 1)."

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 28, 2017, 11:43am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/9 "2017-10-28T11:43:49Z")

</div>

Do you get the same error when you run `cordova build android --verbose --debug`? Additional maybe interesting output?  
What Android Studio version do you have installed?

---

<div class="post-metadata">

**Author:** ![Saravkl](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@Saravkl](https://forum.ionicframework.com/u/Saravkl)\
**Post date:** [October 28, 2017, 11:46am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/10 "2017-10-28T11:46:23Z")

</div>

> [@Nouf](#):
>
> Execution failed for task ‘:processDebugResources’.

i faced same .  
added these lines in “build.gradle” file

configurations.all {  
resolutionStrategy.eachDependency { DependencyResolveDetails details →   
def requested = details.requested  
if (requested.group == ‘com.android.support’) {  
if (!requested.name.startsWith(“multidex”)) {  
details.useVersion ‘25.3.1’  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 28, 2017, 11:52am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/11 "2017-10-28T11:52:43Z")

</div>

> [@Sujan12](#):
>
> cordova build android --verbose

 ![40 PM](https://global.discourse-cdn.com/ionicframework/original/3X/1/f/1f4520ae25ffb56ad4e6781dab1af8611d1652a2.png)

I am doing to lose my mind!!!

this is my Android Studio version v 3.0

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 28, 2017, 11:56am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/12 "2017-10-28T11:56:29Z")

</div>

The error you just posted is the **exact** one from the first link I posted. Read the topic, there are multiple solutions for that one.

And Android Studio 3 is not yet supported by Cordova, you should stay with 2.3.3 for now.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 28, 2017, 12:31pm UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/13 "2017-10-28T12:31:26Z")

</div>

What exactly fixed it for you?

---

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 28, 2017, 12:46pm UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/14 "2017-10-28T12:46:09Z")

</div>

> [@Sujan12](#):
>
> 2.3.3

I did not fixed it yet I am trying to find Android Studio 2.3.3  
caue the the error "JAVA\_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0\_101.jdk/Contents/Home  
Error: spawn EACCES

[ERROR] An error occurred while running cordova run android (exit code 1)."  
is now showing again

---

<div class="post-metadata">

**Author:** ![texasman03](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@texasman03](https://forum.ionicframework.com/u/texasman03)\
**Post date:** [October 28, 2017, 3:29pm UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/15 "2017-10-28T15:29:30Z")

</div>

I fixed it by running build with verbose to get the exact route of the gradle file causing the error

Then doing chmod 755 on that route

---

<div class="post-metadata">

**Author:** ![Nouf](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nouf](https://forum.ionicframework.com/u/Nouf)\
**Post date:** [October 30, 2017, 3:51pm UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/16 "2017-10-30T15:51:19Z")

</div>

that did not work for me  
l try to change the permissions of sdk file

> drwxr-xr-x 12 staff 408 Aug 2 13:18 sdk

and I get this error if I try to change the permissions for Home

> /Library/Java/JavaVirtualMachines/jdk1.8.0\_101.jdk/Contents/Home: Operation not permitted

---

<div class="post-metadata">

**Author:** ![reviloera](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/reviloera/32/72238_2.png) [@reviloera](https://forum.ionicframework.com/u/reviloera)\
**Post date:** [March 13, 2018, 3:22am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/17 "2018-03-13T03:22:37Z")

</div>

Check this out [Go to the answer on installing cordova plugin that handles android variation](https://stackoverflow.com/questions/49162538/running-cordova-build-android-unable-to-find-attribute-androidfontvariation) It will sort you out.

---

<div class="post-metadata">

**Author:** ![hiraddaneshvar](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hiraddaneshvar/32/103072_2.png) [@hiraddaneshvar](https://forum.ionicframework.com/u/hiraddaneshvar)\
**Post date:** [March 13, 2018, 6:10am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/18 "2018-03-13T06:10:35Z")

</div>

Also check this link [https://forums.adobe.com/thread/2462835](https://forums.adobe.com/thread/2462835)

Suddenly I could not build my app (which I was able to do so). I found this link and it solved my issue.

---

<div class="post-metadata">

**Author:** ![danielnaranjo](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/danielnaranjo/32/65819_2.png) [@danielnaranjo](https://forum.ionicframework.com/u/danielnaranjo)\
**Post date:** [April 10, 2018, 3:38pm UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/19 "2018-04-10T15:38:54Z")

</div>

I fixed it updating this file/line:

`cordova.system.library.2=com.android.support:support-v4:27.1.0`

instead of:

`cordova.system.library.2=com.android.support:support-v4:+`

---

<div class="post-metadata">

**Author:** ![Duovili](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/duovili/32/132741_2.png) [@Duovili](https://forum.ionicframework.com/u/Duovili)\
**Post date:** [April 17, 2018, 8:18am UTC](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281/20 "2018-04-17T08:18:14Z")

</div>

where is this line?

I just started getting this build error as well

[Next page](https://forum.ionicframework.com/t/failure-build-failed-with-an-exception-execution-failed-for-task-processdebugresources/110281.md?page=2)
