Reduce apk size android

前端 未结 2 449
旧巷少年郎
旧巷少年郎 2021-01-19 07:59

I am facing a problem with app size in android.

The scenario is,

I developed my android app in Android Studio 2.0 and the size of apk was 23 MB.

Afte

2条回答
  •  渐次进展
    2021-01-19 08:18

    1) Replace all of Images,Icons with vector drawable

    2) Turn on pro guard like following goto build.gradleapp level

    and put these lines

    **shrinkResources true

    minifyEnabled true**

    3) Remove unused classes,drawable and methods and strings and use LINT's private method analyser which reduces method count

    JAVA's Hidden cost

    4) In android studio 2.2 and above they have added apk analyser tool in Build menu. Use that to analyse APk

    5) if app size goes beyond 100mb use feature called split apk. there are two methods of spliting apk ABI and Density Splits

提交回复
热议问题