Strange apk sizes android studio 2.3.3

131 views Asked by At

When I run the app by clicking on the run button the apk size is 90kb, when I build the apk with proguard enabled the apk size is 600kb, when I build apk with proguard disabled the size is 1mb, using apk analyzer I could see that the dex file grows from 45 kb to 1 mb, why does that happen?, what happens when I click the run button? The only way i can get the app to be 90kb is by clicking the run button.

1

There are 1 answers

2
Orvenito On

It's because when you run the app, you build the apk and inside the apk, all dependencies,jar files, assets etc. are compiled.

EDIT:

if you want to understand more on APK's and how to reduce it's size check this link https://developer.android.com/topic/performance/reduce-apk-size.html