Search code examples
androidandroid-studioapkandroid-proguard

enabling proguard does not slows the APK generation


I have an Android application .I am making a release build. Earlier I used to generate signed APK using Eclipse with proguard enabled. It used to take 4 minutes to generated my APK.

Now I have moved to Android Studio. Now when I try to generate signed APK, it only takes 4 seconds. I think its not proper.

buildTypes {
    release {
        minifyEnabled true
        proguardFiles 'proguard.cfg'
    }
}

this are the lines I have added in my build.gradle file to enable proguard. I am generating the signed APK using following steps:

Menu -> Build -> Generate Signed APK... -> selected my module -> Added Keystore Path , password, key alias , password -> selected build type as release ->finish. it finished in 4 seconds and generated the APK .

I want to know why 4 minutes in Eclipse and only 4 seconds in Android Studio. Am I missing something?


Solution

  • Looks Like clean Build was required before start generating the signed APK. As i do clean build , and then generate the APK. It works properly.