I give up, Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt


#1

Hi, I have struggled with error for two days now.
I create a new application with $ Ionic start and then $Ionic cordova run android.
Phone attached is a nexus 5x with android 8.0.0

This is my ionic info:

cli packages: (C:\Users\me\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.5
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v6.10.2
    npm  : 4.5.0
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

In package.json: “cordova-android”: “~6.3.0"
In config.xml: engine name=“android” spec=”~6.3.0"

Any ideas?

Background: It worked, but I got the same error each time I added the firebase plugin. So I ‘played’ along with sdkmanager and now nothing works.


#2

You didn’t post an error message.

What does ionic cordova requirements return?
Try cordova-android 6.4.0.


#3

Sorry, error is in the subject:

  • What went wrong:
    Execution failed for task ‘:processDebugResources’.
    com.android.ide.common.process.ProcessException: Failed to execute aapt

Requirements give me:

Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed Google Inc.:Google APIs:23,android-26,android-25,android-24,android-23,android-22
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-2.8\bin\gradle

#4

That is only part of the error. Post the whole build output you are getting.

What Android Studio version do you have installed?
Might help to install a local Gradle: https://gradle.org/install/