Git Product home page Git Product logo

Comments (7)

plecesne avatar plecesne commented on May 3, 2024

I can think of two possible reasons:

  • The tablet has a higher screen density than the phone, and the resources with higher resolutions take more space.
  • If your app makes use of any native libraries (including from your dependencies), the tablet could be using x86 and the phone arm, and the size of the native libraries can vary quite a bit.

An easy way to find out is to use the "extract-apks" command (You may need to use "get-device-spec" first to extract the device specs of the device in a JSON format you can feed to the extract-apks command): Extract the APKs for each device, and compare them.

from bundletool.

sujan219 avatar sujan219 commented on May 3, 2024

The comparison that I am doing is not between phone and tablet.
Here is the test that I ran:

  1. Install the app from Android Studio to tablet as normal apk.
  2. Check the installed size on disk and see that it is 35MB.
  3. Uninstall the app
  4. Install the app from bundle tool (using install-apk command) from .apks file to tablet.
  5. Check the installed size on disk and see that it is 47MB.

The size should have gone down instead of going up. Could you let me know if I am missing something?

from bundletool.

plecesne avatar plecesne commented on May 3, 2024

What Android version is the tablet on?
Does your app have any native libraries?
Also, how do you measure the size on disk? Is it from the Android storage settings or are you using adb shell or something else?

from bundletool.

sujan219 avatar sujan219 commented on May 3, 2024

I tried Nexus7 (5.0.2) and PixelC (8.0.0) tablets.
No, we don't have any native binaries in our app. We only have about 5 .aar files.
For measuring the size on disk, I checked Android storage from application settings.

from bundletool.

plecesne avatar plecesne commented on May 3, 2024

Thank you.
This is quite strange. Could you use the extract-apks command on the bundle to find out which files are bigger?
There is a known issue which we're looking into which makes XML files slightly bigger, but it would be nice to know for sure by comparing file by file.

from bundletool.

sujan219 avatar sujan219 commented on May 3, 2024

Sure let me do that and get back to you.

from bundletool.

sujan219 avatar sujan219 commented on May 3, 2024

@plecesne nevermind me. Turns out android studio was automatically stripping out resources while I ran directly from the android studio. The normal way of deploying apk and comparing that to using bundle tool showed positive results. So, I was running my test incorrectly.

I will close the issue.

from bundletool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.