My release APK comes out at whopping 20.009 MB (!!).
Just created a really simple Android app, basing it on one of the Android Studio project templates. My app just scans a barcode :-)
Here are my dependencies:
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.mlkit:barcode-scanning:17.0.2'
def camerax_version = "1.1.0-beta01"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
implementation "androidx.camera:camera-view:${camerax_version}"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment:2.4.2'
implementation 'androidx.navigation:navigation-ui:2.4.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Here are my release build parameters:
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
As is evident from the dependencies, I have added the ML kit. According to https://developers.google.com/ml-kit/vision/barcode-scanning/android, it shouldn't add more than 3.2 MB.
I ran the size-analyzer, and it tells me:
No size saving suggestions found.
So what's going on here? Why is my APK so colossal?