Last active
June 15, 2016 11:17
-
-
Save manishpathak99/3a24f55a049a0b68b7e374248c062201 to your computer and use it in GitHub Desktop.
Steps to reduce the apk size.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1- reduce the other's language strings in string.xml | |
add below in build.gradle- | |
defaultConfig { | |
resConfigs "en" | |
} | |
2- unzip the final apk, go to res directory, run the below commamd to know the size of resfiles in descending order. | |
find . -type f -exec ls -al {} \; | sort -nr -k5 | head -n 25 | |
3- | |
EXAMPLE: | |
removed okhttp -> 4,072,187 bytes 4.1 mb | |
removed karim -> 4,025,299 bytes | |
Original number of program classes: 4450 | |
removed alfodan Dialogs -> 3,668,810 bytes (3.7 MB on disk) | |
Original number of program classes: 4040 | |
Removed Flurry -> 3,567,670 bytes (3.6 MB on disk) | |
3,626,086 | |
3,685,543 bytes enable karim | |
3,670,960 | |
3,452,772 bytes -> removing intransitive dependencies | |
3,457,166 bytes -> enable Circular | |
3,463,558 bytes -> enable DND , used http url connection | |
total class :> 3678 | |
3,463,558 bytes -> enable DND , used http url connection | |
total class :> 3678 | |
3,466,428 bytes (3.5 MB on disk) -> Used the Appcompact Dialogs | |
total class :> 3681 | |
3,611,034 bytes (3.5 MB on disk) -> Added Crashlytics ~145 KB | |
total class :> 4044 | |
3,301,799 bytes (3.3 MB on disk) -> only en-resource build.xml | |
3,258,534 bytes (3.3 MB on disk) -> removed some images | |
3,229,536 bytes (3.2 MB on disk) -> removed coming soon image | |
3,258,363 bytes (3.3 MB on disk) | |
design support material tab up to 14+ | |
Current app 3.65 MB download. | |
New app 2.77 MB download. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment