How to reduce apk size when using play services gcm

前端 未结 3 730
故里飘歌
故里飘歌 2021-01-22 01:23

My generated signed apk size is 30kB, when I add play services gcm to gradle file the apk size increased to 800kB. by shrinking resource the apk size become 600

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-22 01:40

    At the moment that is the size of that dependency. The reason that the .apk gets an increase in size for every dependency is because your application requires those to function, and cannot depend on accessing it from a remote location, incase a device does not have an internet connection.

    According to this, (and IntelliJ's comment), if you configure your proguard you can try to reduce the size a little.

    Also consider the following: Shrink Google Play Services library for use with Google Analytics only.

提交回复
热议问题