[英]Same code's exported apk in Android Studio is way bigger than Intellij IDEA
I have this very simple application with one simple Activity that on start downloads a file from a server. 我有一个非常简单的应用程序,其中包含一个简单的活动,该活动一开始就从服务器下载文件。 That's it.
而已。 Nothing more.
而已。 Yet when I export this application from Android Studio, the apk size is 1.1 MB, and when I export it from IntelliJ IDEA, it becomes as small as 40 KB.
但是,当我从Android Studio导出此应用程序时,apk大小为1.1 MB,而从IntelliJ IDEA导出时,它的大小只有40 KB。 That's a HUGE difference.
那是巨大的差异。
What might be wrong here? 这里可能出什么问题了? Everything is in default mode, just the IDE differs here.
一切都处于默认模式,只是IDE有所不同。
Need to set the shrinkResource to true 需要将shrinkResource设置为true
And also set the shrinkMode to strict for maximum shrinking. 还要将rinkleMode设置为strict以最大程度地缩小。
Follow this link shrinkResources set to true, but all unused resources (specifically drawables) not getting removed 按照此链接将rinkResources设置为true,但不会删除所有未使用的资源(特别是可绘制对象)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.