Background
According to the "Resource Shrinking" webpage of Andriod documentations (here), you can minimize the app's size via the build.gradle file, by using these lines:
android {
...
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
And, they say that when using it, it will also tell you how much is saved in the process:
When you enable shrinkResources, building your app should display
output like the following during the build:
...
Removed unused resources: Binary resource data reduced from 2570KB to
1711KB: Removed 33%
The questions
I can't find out the answers to those questions:
- When using Android-Studio itself to create the signed app, where can I find the information of how much was saved and which files were removed/modified?
- What exactly does "shrinkResources" do that "minifyEnabled" don't? And why do "shrinkResources" depend on "minifyEnabled" ?
- Do any of those options affect the size and/or quality of image files?
- Isn't Proguard responsible of shrinking source code? I ask this because it says "you have to enable minifyEnabled in order to turn on code shrinking,"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…