Page 1 of 2

Android APK Build error

Posted: Sun Sep 09, 2018 4:00 pm
by Andy Parker

Hi, I'm getting an APK build error when trying to build a release APK.
A non release builds fine, just release fails.....

Can you take a look please?

Build error

Most likely build error cause:

Warning: RequireJS failed.
Aborted due to warnings.

Project Name: ScheduleNow.
Project shared with Support.


Android APK Build error

Posted: Tue Sep 11, 2018 9:17 am
by Serhii Kulibaba

Hello Andy,

Please remove the symbol "comma" from the line 231 in the file signature_pad.js
Image


Android APK Build error

Posted: Tue Sep 11, 2018 3:37 pm
by Andy Parker

Thanks Serhii,

I've made that change, unfortunately, that hasn't fixed the build issue.

I'm still getting a fail.

---------------------------------------

Build error

Most likely build error cause:

Warning: RequireJS failed.
Aborted due to warnings.


Android APK Build error

Posted: Tue Sep 11, 2018 4:15 pm
by Galyna Abramovych

Hello,

Please check your code again, now it shows this:
code [31m>> [39mError: Cannot parse file: [31m
[39m/.../android/app/www/bui [31m
[39mld/www/libs/SignaturePad/signature_pad.js for comments. Skipping it. Error [31m
[39mis: [31m
[39mError: Line 446: Unexpected token )
[33mWarning: RequireJS failed. Use --force to continue. [39m

[31mAborted due to warnings. [39m/code


Android APK Build error

Posted: Wed Sep 12, 2018 10:05 am
by Andy Parker

Hi Galyna,

many thanks for this, the code was imported and did seem to contain a lot of extra commas that were not required.

In the end, I use a great javascript validator to find all the issues:

https://www.piliapp.com/javascript-va...

Very useful !

But......I still get the following build error....

Build error

Most likely build error cause:

Warning: RequireJS failed.
Aborted due to warnings.


Android APK Build error

Posted: Thu Sep 13, 2018 6:40 am
by Serhii Kulibaba

The last build was successful. Please let us know if we can be of further assistance.


Android APK Build error

Posted: Thu Sep 13, 2018 7:34 am
by Andy Parker

No, the last build was a debug, that works. It's releases that don't build


Android APK Build error

Posted: Thu Sep 13, 2018 8:07 am
by Andy Parker

Just tried another Release build, and failed again.


Android APK Build error

Posted: Thu Sep 13, 2018 12:27 pm
by Serhii Kulibaba

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 http://refresh-sf.com/yui/ 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


Android APK Build error

Posted: Thu Sep 13, 2018 2:47 pm
by Andy Parker

Thanks for this, useful info.

I'm now able to hopefully prepare the code before attempting a build.