Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

Error creating android app uglification error

I am getting the following error:

Image

The error message is pointing to the following function:

Image

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

Error creating android app uglification error

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/

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

Error creating android app uglification error

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

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

Error creating android app uglification error

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
Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Error creating android app uglification error

Hello Terry,

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

Return to “Issues”