Android Build Failed

Hi,

Looks like the app needs SDK Platform API 23, so you should install it again, sorry,

I had this problem before and it was because i updated one of the packages, i think it was the build tools version 23, not platform api 23.

So you can try to remove the build tools v23 , make sure that v22 of build tools is installed.

Thanks again :slight_smile: @akilud did as you instructed still no luck :disappointed:

=> Reinstalled SDK Platform API 23
=> Removed Build Tools v23 and installed v22

" I guess right now i’m getting first error i posted " :sweat:

CONSOLE LOG:

C:\Windows\System32\scotch-todo>ionic build android
Running command: “C:\Program Files\nodejs\node.exe” C:\Windows\System32\scotch-t
odo\hooks\after_prepare\010_add_platform_class.js C:\Windows\System32\scotch-tod
o

add to body class: platform-android

ANDROID_HOME=C:\Users\rshalik\AppData\Local\Android\sdk

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101

Observed package id ‘add-ons;addon-google_apis-google-23’ in inconsistent locati
on ‘C:\Users\rshalik\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-
23-1’ (Expected ‘C:\Users\rshalik\AppData\Local\Android\sdk\add-ons\addon-google
_apis-google-23’)

Already observed package id ‘add-ons;addon-google_apis-google-23’ in ‘C:\Users\r
shalik\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-23’. Skipping
duplicate at ‘C:\Users\rshalik\AppData\Local\Android\sdk\add-ons\addon-google_ap
is-google-23-1’

Incremental java compilation is an incubating feature.

:preBuild
UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
UP-TO-DATE
:CordovaLib:packageDebugRenderscript
UP-TO-DATE
:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:generateDebugResValues
UP-TO-DATE

:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources
UP-TO-DATE

:CordovaLib:compileDebugAidl
UP-TO-DATE

:CordovaLib:generateDebugBuildConfig
UP-TO-DATE

:CordovaLib:mergeDebugShaders
UP-TO-DATE

:CordovaLib:compileDebugShaders
UP-TO-DATE
:CordovaLib:generateDebugAssets
UP-TO-DATE
:CordovaLib:mergeDebugAssets

UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE

:CordovaLib:processDebugResources
FAILED

BUILD FAILED

Total time: 9.109 secs

FAILURE: Build failed with an exception.

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

com.android.ide.common.process.ProcessException: org.gradle.process.internal.E
xecException: Process ‘command ‘C:\Users\rshalik\AppData\Local\Android\sdk\build
-tools\22.0.1\aapt.exe’’ 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.

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

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

com.android.ide.common.process.ProcessException: org.gradle.process.internal.E
xecException: Process ‘command ‘C:\Users\rshalik\AppData\Local\Android\sdk\build
-tools\22.0.1\aapt.exe’’ 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.

=> Thankyou, so much for your care @akilud , would you look for installed items in your Android SDK Manager, so I can try with your combinations :innocent:

Hi,

I think its better if you looked at the answers in this stackoverflow post http://stackoverflow.com/questions/30645900/ionic-build-android-failure-execution-failed-for-task-processdebugresources

Sorry i couldn’t be of much help.

:slight_smile: Thanks @akilud I’ll go through your stack link and let you know…
Thankyou for your time mate :relieved:

Did you solve this issue? I’m having this too and SO didn’t help.

Hey there @GreenRunning sorry for being late
Nope buddy! I’m still having this issue :cold_sweat: getting in my nerves :disappointed:

Any expert out there, please give some blessings here :relieved:

Hey - I managed to solve it in the end by noticing that the build would work when I removed my Bower folder and it’s contents.

Then I just went through deleting one-by-one until I found the plugin that was stopping it working. The error message is incredibly unhelpful, it was almost by chance that I discovered this was the issue.

Maybe try something along them lines. Good luck!

Hi I am also facing the same and tried almost all the things but still the issue is same I am using build tool Android\sdk\build-tools\24.0.3. Please anyone help me to resolve the same.

Generating new resources files (‘ionic resources’ from project folder) did the trick for me!

In my case, I changed jdk from 1.7 to 1.8 and added android as platform earlier. Now, I had to remove android platform and then had to add it again. It worked… :slight_smile:

I managed to solve the changed file myproject\platforms\androidproject.properties android

  • 22 target for android -23 [target=android-23]

WARN: ionic.project has been renamed to ionic.config.json, please rename it.
Running command: “C:\Program Files\nodejs\node.exe” E:\untukapa\IonicOpenFileDem
o\hooks\after_prepare\010_add_platform_class.js E:\untukapa\IonicOpenFileDemo

add to body class: platform-android

ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121

Subproject Path: CordovaLib

Starting a new Gradle Daemon for this build (subsequent builds will be faster).

Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
Before building your project, you need to accept the license agreements and comp
lete the installation of the missing components using the Android Studio SDK Man
ager.
Alternatively, to learn how to transfer the license agreements from one workstat
ion to another, go to Exporting licenses - Android Studio Project Site

  • Try:

BUILD FAILED

Total time: 1 mins 21.194 secs

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

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
Before building your project, you need to accept the license agreements and comp
lete the installation of the missing components using the Android Studio SDK Man
ager.
Alternatively, to learn how to transfer the license agreements from one workstat
ion to another, go to Exporting licenses - Android Studio Project Site

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