APK size is too big

Hello guys!

How can I to reduce APK size? The image shows the comparation between my APK and the APK from starter ionic 2 project. is the www/assets/build too big? Can I minify theses files and delete the “map file” when i build in release mode?

Versions:
ionic: 2.1.1
cordova: 6.3.1
nodejs: 5.12.0
ionic-app-scripts: 0.0.39

Thank you.

Could someone help me please?

You need to apply progurad technique, etc.

I haven’t tried yet. But you can follow below links and give a try.

https://developer.android.com/topic/performance/reduce-apk-size.html


http://cyrilmottier.com/2014/08/26/putting-your-apks-on-diet/

These link helps to reduce the APK size, in ’ Native Android '.
I think this may help with ionic-2 too.

But I’m not sure same technique will work with ionic-2, (ideally it has to work though).

If you succeed to achieve it, plz do share here.
Because I also wanted to know will this work with ionic-2

Thanks.

I think it’s more about the main.js having 4MB (probably not minified?), and main.js.map another 4MB. Is there any way in Ionic 2 to build the app without the map file and minifying the code?

1 Like