Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Android APK Build error

OK, so I got my code to pass the yui-compressor by finding an already compressed version of SignaturePad.

But now I see the following error:
Build error

Most likely build error cause:

(node:31467) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Android APK Build error

OK, changed the signaturepad.js for a version that is compressed and passes the yui-compressor on the URL you gave - thank you for that.

The signature pad works great when testing, but the release build now fails as follows:

Build error

Most likely build error cause:

(node:3145) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

Android APK Build error

Hello again,

Yes, now the build throws another error:

code
...

  • Where:
    Script '/srv/.../android/app/platforms/android/CordovaLib/cordova.gradle' line: 143

  • What went wrong:
    Failed to create component for 'dialog' reason: java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.

    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    ...
    /code

alidacalliope
Posts: 1
Joined: Tue Nov 29, 2022 9:08 am

Re: Android APK Build error

Serhii Kulibaba wrote: Thu Sep 13, 2018 12:27 pm

We use forced by yui-compressor plugin minification for JS and CSS (Release builds). You need to use correct JS and CSS syntax for yui-compressor plugin. You can check compressing on https://techtodown.com/ or any other external yui-compressor resources.
So the build log shows us an error: pre [39mError: Cannot uglify2 file: [31m
[39m/srv/tiggzi/jenkins/workspace/477848-android/54874/477848/android/app/www/bui [31m
[39mld/www/libs/SignaturePad/signature_pad.js. Skipping it. Error is: [31m
[39mUnexpected token operator «=», expected punc «,» (line: 92, col: 64, pos: [31m/pre

Thanks for the guide, I tried it and it worked.

Return to “Issues”