Comments (7)
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.
The comparison that I am doing is not between phone and tablet.
Here is the test that I ran:
- Install the app from Android Studio to tablet as normal apk.
- Check the installed size on disk and see that it is 35MB.
- Uninstall the app
- Install the app from bundle tool (using install-apk command) from .apks file to tablet.
- 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.
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.
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.
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.
Sure let me do that and get back to you.
from bundletool.
@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)
- Error: Module 'myzip' is missing mandatory file 'manifest/AndroidManifest.xml' HOT 2
- bundletool build-apks failed when minsdk<21 HOT 1
- [BUG] Error: Module 'base' is missing mandatory file 'manifest/AndroidManifest.xml'. HOT 1
- Add bundletool to winget
- The App bundle is not a valid zip file HOT 1
- Unable to sign apk HOT 2
- Unable to sign APK due to FileAlreadyExistsException HOT 5
- com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: Invalid dex file indices, expecting file 'classes?.dex' but found 'classes2.dex'. HOT 2
- Does it make the opposite? HOT 1
- the aab upload to Google Play, size counting issue HOT 1
- Error: Module 'base' is missing mandatory file 'manifest/AndroidManifest.xml'. HOT 2
- How does `bundletool build-apks` generate the versionCode for the APKs? HOT 3
- Returns immediately on command line without any info
- Size differs between bundletool and apkanalyzer.
- Unable to install dynamic feature modules with max sdk in manifest
- Set splittypes
- Please ignore
- Option NOT To Sign The APK Even If Debug Keystore Is Present
- Bundletool Package using 2 versions of AAPT2 Proto
- bundletool leaves 100s of KB of META-INF metadata in output APKs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundletool.