Ionic Cloud Android Package Failing

Packaging Android using the Ionic Cloud worked once, but now has failed on several subsequent attempts. To package we run the command:

ionic package build android --profile development

Building locally using both ‘ionic run android’ and ‘ionic build android’ both work fine, and there are no issues running the app on any of our test devices. The error we are currently receiving in the Ionic Cloud console is:

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 ‘/usr/local/src/android-sdk-linux/build-tools/24.0.2/aapt’’ 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.

BUILD FAILED

Total time: 5.601 secs
Error: Error code 1 for command: /home/package/workspace/apps-94cd09b8-8/cordova/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/package/workspace/apps-94cd09b8-8/cordova/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

Was able to get this working again so closing issue.

I had to reinstall ionic2 from scratch, started a new project, moved my existing source to new project and then ran the package command again.