android - APK file size and Andorid Studio APK building process -


so, realized that, reason, android studio produces differently sized apk files when i'm doing manually using gradle.

so, when build file gradle (either gradle build or gradle assembledebug) getting apks sized depending on whether have activated proguard or not.

without proguard file around 62k method references. proguard activated apk file around 37k method references , 6mb heavy. , seems okay.

but! when run app android studio (with proguard activated), apk file heavy around 3mb and, when imported analysis has 2 dex files (classes.dex , classes2.dex), , both of them shows 300 method references, is, obviously, not correct.

and app works no matter way i've built it, haven't seen irregularities.

so, how , why happen? tried google little bit how android studio building process, without success. assumed shouldn't make file different 1 make calling gradle build, not case.

i using gradle 3.3 (as gradle wrapper) , android studio 2.3.3.

this numbers might relevant:

compilesdkversion 26 buildtoolsversion '26.0.1' minsdkversion 16 targetsdkversion 25 

apk compile using manual run button on android studio, optimized device targeted only, while apk compiled using gradle command, used target other devices. check out

https://medium.com/@elye.project/manual-compile-produces-smaller-apk-size-from-command-line-gradle-compile-6cc08d98f2be

https://medium.com/@elye.project/dont-publish-your-manually-compiled-apk-c8ce2bf7e6b4

not sure why apk 300 method references.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -