Best Practices 
to Slim Down Your App Size

Best Practices 
to Slim Down Your App Size

# About me
- Twitter
- https://twitter.com/shihochandesu

- Github
- https://github.com/shihochan

# Links
- What's new in Android Development Tools + Google Play
- https://goo.gl/lV4o2s

- What's new in Android Development Tools
- https://goo.gl/ekrV3L

- What's new in Android at I/O '17
- https://goo.gl/5eZKRX

- Best Practices to Slim Down Your App Size
- https://goo.gl/St88vS

- What's New in Google Play
- https://goo.gl/69Rp7E

0ef9d512061aa068aafd47c3e3f13ce0?s=128

Yuki Shiho

June 16, 2017
Tweet

Transcript

  1. :VLJ4IJIP !TIJIPDIBO #FTU1SBDUJDFT
 UP4MJN%PXO:PVS"QQ4J[F VNFEBBQLJO

  2. "CPVUNF 䘊歂⣇秀:6,*4)*)0 !TIJIPDIBO "OESPJE"QQ%FWFMPQFSBU$ZCFS"HFOU *OD !TIJIPDIBOEFTV 4IJCVZBBQL

  3. .PCJMFSTUUP"*STU

  4. .Z*0ˏ 㸜㹀ך衅鼅

  5. .Z*0ˏ 䗁崞

  6. (PPHMF*0

  7. (PPHMF*OQVU0VUQVU

  8. .Z*0ˏ ׃קˏT*OQVU ˖ (PPHMF,FZOPUF ˖ %FWFMPQFS,FZOPUF ˖ 8IBUT/FXJO"OESPJE ˖ "OESPJE1FSGPSNBODF"O0WFSWJFX

    ˖ &YP1MBZFS'MFYJCMFNFEJBQMBZCBDLGPS"OESPJE ˖ #FTU1SBDUJDFTUPTMJNEPXOZPVSBQQTJ[F ˖ 'SBHNFOU5SJDLT ˖ 8IBUT/FXJO"OESPJE%FWFMPQNFOU5PPMT ˖ *OUSPEVDUJPOUP"OESPJE*OTUBOU"QQT ˖ 8IBUTOFXJO"OESPJE4FDVSJUZ ˖ 8IBUTOFXJO"OESPJE%FTJHO5PPMT/FXGFBUVSFTBOE UPPMTGPSSBQJE6*EFWFMPQNFOU ˖ 8IBUTOFXJO/PUJDBUJPOT -BVODIFS*DPOTBOE4IPSUDVUT ˖ 4QFFEJOHVQZPVS"OESPJE(SBEMFCVJMET ˖ 1FSGPSNBODFBOE.FNPSZ*NQSPWFNFOUTJO"OESPJE3VO 5JNF "35  "OE.03&٥٥٥
  9. .Z*0ˏ ׃קˏT0VUQVU ˖ (PPHMF*0䮶׶鵤׶BU"11%0+0 ˖ IUUQTHPPHM8NW/0 ˖ $"BQL(PPHMF*0㜠デ⠓ ˖ IUUQTHPPHMH6TNH

    ˖ (PPHMF*0ؿ؍٦سغحؙ⠓ ˖ IUUQTHPPHMU3#8:$ ˖ VNFEBBQL3FQPSUGSPN(PPHMF*0 ˖ /PX
  10. 4MJN%PXO"QQ4J[F

  11. %PXOMPBE4J[F*OTUBMMFE4J[F

  12. ˑ"1,TJ[FJT
 TVQFSJNQPSUBOU˒ "HVTUJO'POUT

  13. 8IZJNQPSUBOU 

  14. 6QUPEPXOMPBEDBODFMMBUJPOSBUFT 4PVSDF(PPHMF*OUFSOBM%BUB

  15. .# BQQTYNPSFMJLFMZUPHFUVOJOTUBMMFE 4PVSDF(PPHMF*OUFSOBM%BUB

  16. )PXUPTMJNEPXO 

  17. :PVS.JMFBHF.BZ7BSZ "ODJFOU%FWFMPQFS1SPWFSCT

  18. ˟⸬卓חכ
 խ⦐➂䊴ָ֮׶תׅ ݹΑΓ఻ΘΔΤϯδχΞ͜ͱΘ͟

  19. XBZUPTMJNEPXO ˖ $VTUPNJ[JOHCVJMEHSBEMF ˖ "OESPJE4UVEJP ˖ 1MBZ$POTPMF

  20. $VTUPNJ[JOHCVJMEHSBEMF android { buildTypes { release { minifyEnabled true }

    } } 6TF1SPHVBSE
  21. $VTUPNJ[JOHCVJMEHSBEMF android { buildTypes { release { minifyEnabled true shrinkResources

    true } } } &OBCMF3FTPVSDF4ISJOLJOH
  22. $VTUPNJ[JOHCVJMEHSBEMF android { splits { density { enable true }

    } } #VJME.VMUJQMF"1,T
  23. $VTUPNJ[JOHCVJMEHSBEMF android { defaultConfig { vectorDrawables.useSupportLibrary true } } 6TF7FDUPS%SBXBCMFT

  24. $VTUPNJ[JOHCVJMEHSBEMF android { defaultConfig { resConfigs en } } &YDMVEF4QBSTF5SBOTMBUJPOT

  25. .#MFTTUIBO.# $VTUPNJ[JOHCVJMEHSBEMF

  26. "OESPJE4UVEJP %PXOMPBEBCMF'POUT4VQQPSU

  27. ˖ ""15 "OESPJE"TTFU1BDLBHJOH5PPM  ˖ 7FSTJPODPMMBQTJOH ˖ 3FTPVSDFEFEVQMJDBUJPO ˖ 65'FWFSZXIFSF

    ˖ 4NBSUFSDSVODIFS "OESPJE4UVEJP
  28. android.enableAapt2=true 5SZ""15OPX gradle.properties "OESPJE4UVEJP

  29. ˖ "1,"OBMZ[FS "OESPJE4UVEJP

  30. ˖ "1,"OBMZ[FS ˖ *OTUBOU"QQTך׋׭ח刿חꅾ銲ח ˖ 1SP(VBSEך.BQQJOHؿ؋؎ٕ㼎䘔 "OESPJE4UVEJP

  31. 1MBZ$POTPMF ˖ 'JMFCZ'JMFQBUDIJOH ˖ </FX>(PPHMF1MBZ"QQ4JHOJOH ˖ <#FUB>"QQ0QUJNJ[BUJPOT ˖ "VUPNVMUJQMF"1,

  32. 1MBZ$POTPMF 'JMFCZ'JMFQBUDIJOH 4PVSDF(PPHMF*OUFSOBM%BUB

  33. 3FGFSFODFT ˖ #FTU1SBDUJDFTUP4MJN%PXO:PVS"QQ4J[F ˖ IUUQTHPPHMC[;(C9

  34. :VLJ4IJIP !TIJIPDIBO 5IBOLZPV 4FFZPVOFYU*0ˏ VNFEBBQLJO