0

I'm trying to reduce the APK size. So as suggested by Google I used shrinkResources and it requires minifyEnabled to be true in bulid.gradle

buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
            'proguard-rules.pro'
    }
}

But the problem is once this is done, the build never ends.

enter image description here

proguard-rules.pro is empty I haven't changed anything in it. And, something called Unmanaged thread operation #-1 also appeared.

What would be the issue?

Community
  • 1
  • 1
Roshana Pitigala
  • 8,437
  • 8
  • 49
  • 80
  • see this [link](https://stackoverflow.com/questions/50583150/proguard-cant-find-common-super-class-of-com-google-android-gms-d-kl/50622234#50622234) & [this](https://stackoverflow.com/questions/51821712/i-am-getting-error-in-generating-production-release-apk-my-error-is?answertab=oldest#tab-top) – Talha Bilal Mar 28 '19 at 11:04

1 Answers1

1

The build finally ended after running for 16m 17s. Although normal APK generate takes about 3 minutes, it is worth waiting because the apk size was actually reduced in about 52% compared to a normal signed apk

normal apk  : 4585 KB
minified apk: 2170 KB
Roshana Pitigala
  • 8,437
  • 8
  • 49
  • 80