1
votes

I'm seeing these errors after fresh ionic, cordova, and JDK update installations when I do android build:

BUILD FAILED

Total time: 6.254 secs FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':processDebugResources'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'c:\Android\sdk\build-tools\24.0.2\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: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':processDebugResources'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'c:\Android\sdk\build-tools\24.0.2\aapt.exe'' finished with non-zero exit value 1

2
Do you have right android API SDK version installed? - phreakv6
I have SDK Tooks (25.2.2), SDK Platform-Tools (24.0.3), SDK Build-tools (24.0.2), SDK Build-tools (24, 23.0.1, 22.0.1, 21.1.2, 20), then SDK Platform for 7.0; 6.0; 5.1.1; 4.4.2; 4.3.1; 4.2.2; 4.1.2; 4.0.3; 4.0; 2.2; and extras Google APIs, Support Repository, Google Repository, and USB driver. - Mark B

2 Answers

1
votes

You have to update to JDK 8. Looks like you have the older version 7.

Try JDK 8

and see if it helps.

0
votes

I had the same problem reinstalled SDK didn't work removed old sdk and reinstalled SDK did't work

You need to delete the android folder form the platform folder and execute ionic run android this will reinstall the platform automatically and build from scratch. I think the cache files are the problem so that is why I think this worked.

I hope it will also work for others.