Is it normal for my .apk to be 100Mb?



  • Hi,

    I have a very simple app with just a few pages and when I did my first google play store build the app came out to 100Mb. For a very small app this seems like a massively large app size that makes it hard to get customers to install. Am I missing something with my setup?

    Kind Regards,
    Ian.



  • What all assets did you include in your build?



  • Thanks for the response.

    I have these components (standard ones) loaded.
    0_1465792105377_Screen Shot 2016-06-13 at 7.27.05 AM.png

    I also have 6 simple html files and an .mp3 file that’s 197KB.

    When I export the whole app for backup it’s 2.7MB, When I build for android it’s 102.9MB.

    Did I understand your use of “assets” correctly?

    Thanks again.


  • Monaca

    Which Cordova plugin are you importing?



  • Cheers,

    I believe I have these installed:
    0_1465822525871_Screen Shot 2016-06-13 at 3.54.20 PM.png



  • Being from a java background I tried to unzip the .apk to get more clarity in what was taking up the space.

    It turns out the assets are 8.0MB, most of that is taken up by the onsen-ui library.

    du -sh assets/www/components/*
    4.0K    assets/www/components/loader.css
    588K    assets/www/components/loader.js
    8.0K    assets/www/components/monaca-cordova-loader
     68K    assets/www/components/monaca-core-utils
    6.8M    assets/www/components/monaca-onsenui
    

    The real space was taken up by the “res” folder:

    res/*
    5.3M    res/drawable-hdpi-v4
    5.3M    res/drawable-land-hdpi-v4
    5.3M    res/drawable-land-ldpi-v4
    5.3M    res/drawable-land-mdpi-v4
    5.3M    res/drawable-land-xhdpi-v4
    5.3M    res/drawable-land-xxhdpi-v4
    5.4M    res/drawable-land-xxxhdpi-v4
    5.3M    res/drawable-ldpi-v4
    5.3M    res/drawable-mdpi-v4
    5.3M    res/drawable-port-hdpi-v4
    5.3M    res/drawable-port-ldpi-v4
    5.3M    res/drawable-port-mdpi-v4
    5.3M    res/drawable-port-xhdpi-v4
    5.3M    res/drawable-port-xxhdpi-v4
    5.4M    res/drawable-port-xxxhdpi-v4
    5.3M    res/drawable-xhdpi-v4
    5.3M    res/drawable-xxhdpi-v4
    5.4M    res/drawable-xxxhdpi-v4
    

    Does this mean I need to drop splash screens, build for one “catch all” screen size or have different builds for different resolutions?



  • OK, I’ve looked further into those “res” folders and have found some rather large screen.png images. I had assumed that they would be resized for each screen type.

    I will re-upload the images at a smaller size and I believe we will come in under 15MB.

    Thank you for the help as I get started with this framework.


  • Monaca

    Glad you were able to fix it! :)


Log in to reply