How to reduce the size of apk?


#1

As most of you must have seen a simple single page app generates an apk of 3-3.5mb
so is there is any possible way i can reduce this ?


#2

What about compress it? You could use uglify.


#3

UPDATE: The minification is now part of the standard build process for TypeScript and JavaScript.

Check out the following post for a simple integration of uglify:

Furthermore I would recommend to exclude the source maps from the .apk file by further modifying the code like this (check out the full code in the other post):

// ...
      buildBrowserify({ browserifyOptions: { debug: !isRelease } }).on('end', function(){
        minifyScripts('www/build/js', done);
      });
// ...

Note that this is a temporary workaround, AFAIK the built-in minification is on the way and I guess that it will be released pretty soon.


#4

thanks sir , was helpful :slight_smile: