Issue
I created the app using Ionic and the Android APK file size is too big.
Before the API integration The File Size was 4.8MB. When I integrated the API I modified just 10 Pages now the APK file size is 71 MB.
Here are the Cordova Plugins I have used:
cordova-plugin-consolecordova-plugin-datepickercordova-plugin-devicecordova-plugin-network-informationcordova-plugin-splashscreencordova-plugin-statusbarcordova-plugin-whitelistcordova-plugin-x-socialsharingcordova-sqlite-storagees6-promise-pluginionic-plugin-keyboard
I unzipped the APK file to find out what going on. I looked at the build Folder in assets/www/ folder which alone was 357MB and it contains JavaScript and MAP files and a 4.5MB CSS file.
How do I decrease the size of the Ionic Android APK file?
Solution
You should use the --prod and --release flags when building the APK file for production. It reduces the size by compressing the files.
ionic build android --prod --release
Answered By - suzan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.