Page 1 of 1

Error creating android app uglification error

Posted: Mon May 08, 2017 4:22 pm
by Terry Gilliver

I am getting the following error:

Image

The error message is pointing to the following function:

Image


Error creating android app uglification error

Posted: Mon May 08, 2017 8:52 pm
by Galyna Abramovych

Hello Terry,

Have you added functions.js asset to the project?
If so - it has some errors. Please check this file code with JSLint.
http://jslint.com/


Error creating android app uglification error

Posted: Tue May 09, 2017 10:48 am
by Terry Gilliver

There is an error with JSLint, it seems not to like the equals sign in duration = 3000.
However this is just a default setting.

this app works as a web app and will also build in debug mode, but not in release mode


Error creating android app uglification error

Posted: Tue May 09, 2017 4:18 pm
by Terry Gilliver

It appears that the builder doesn't support Javascript ES6.
I change the code to the following (compatible with previous versions of Javascript):

pre /**

  • Echo Error Message on service failure
    */
    function alertError(msg, duration) {
    duration = typeof duration !== 'undefined' ? duration : 3000;
    var el = document.createElement("div");
    el.setAttribute("style", "position:fixed; top:10%; left:10%; border: black 1px solid; background-color:white; color:red; width:80%; text-align: center; z-index: 1000;");
    el.innerHTML = "
    " + msg + "
    ";
    setTimeout(function(){
    el.parentNode.removeChild(el);
    },duration);
    document.body.appendChild(el);
    }/pre

Error creating android app uglification error

Posted: Wed May 10, 2017 11:23 am
by Serhii Kulibaba

Hello Terry,

Yes, you are absolutely right. Appery.io works with ES5 and doesn't support ES6