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


#1

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.

#2

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


#3

First error: Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
Second error: Android Build Error (EACCES)


#4

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


#5

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


#6

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


#7

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


#8

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


#9

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?


#10

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


#11

I am doing to lose my mind!!!

this is my Android Studio version v 3.0


#12

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.


#13

What exactly fixed it for you?


#14

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


#15

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


#16

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


#17

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


#18

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.


#19

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


#20

where is this line?

I just started getting this build error as well