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

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

This is all so old that I am surprise anything works at all.
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 ?

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

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)."

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?

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’
}
}
}
}

I am doing to lose my mind!!!

this is my Android Studio version v 3.0

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.

1 Like

What exactly fixed it for you?

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

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

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

Check this out Go to the answer on installing cordova plugin that handles android variation It will sort you out.

Also check this link 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.

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:+

1 Like

where is this line?

I just started getting this build error as well

I update this file: project.properties into YOURPROJECT\platforms\android\

This worked for me for the same error!! :slight_smile:

1 Like

Try removing the googleplus plugin and re-adding it