Page 2 of 2

Android APK Build error

Posted: Thu Sep 13, 2018 3:45 pm
by Andy Parker

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.


Android APK Build error

Posted: Thu Sep 13, 2018 4:01 pm
by Andy Parker

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.


Android APK Build error

Posted: Fri Sep 14, 2018 6:52 pm
by Galyna Abramovych

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


Re: Android APK Build error

Posted: Tue Nov 29, 2022 9:10 am
by alidacalliope
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.