How to reduce APK size in android

Suraj Bahadur
By -
0

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/


Tags:

Post a Comment

0Comments

Post a Comment (0)