Monday, 8 January 2018

How to reduce APK size in android

  No comments

1.Inside build.gradle file(App Level):
buildTypes {
        release {
removeUnusedCode true
                removeUnusedResources true
                minifyEnabled true // you are telling proguard to remove all the unused methods, instructions and slim down the classes.dex file.
                shrinkResources true //wii remove all the resources not used in project
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
2.If possible replace .png images wih .webp

PNG and JPEG compression
https://tinypng.com/


No comments :

Post a Comment

Loading...