Generate Signed APK (Signed APK using minifyEnabled true and shrinkResources true): Errors while building APK | Part 3

Jyotishgher Astrology
By -
0

 

Generate Signed APK: Errors while building APK Android Studio (Signed APK using minifyEnabled true and shrinkResources true)




I am unable to generate Signed APK using minifyEnabled true and shrinkResources true

minifyEnabled is an Android tool that will decrease the size of your application when you go to build it .

android {

    buildTypes {
        release {
            shrinkResources true // This must be first 
            minifyEnabled true   // This must be after shrinkResources 
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
    }
}

Clean project and start again generate signed Build/Apk. its working fine for me.

Also You can face:

Expiring Daemon because JVM heap space is exhausted



This can be fixed by increasing the configured max heap size for the project.

Through IDE:

Add the below lines into the gradle.properties file. Below memory size (1) can be configured based on the RAM availability

org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m

Post a Comment

0Comments

Post a Comment (0)