Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use new Android 2.0 Shrinker and Resource Shrinker together?

I am trying to use the new Shrinker for debug builds (at 3:14)

https://youtu.be/xxx3Fn7EowU?t=3m14s

Also I want to enable shrinking unused resources after that.

My config is

        debug {
        minifyEnabled true
        useProguard false
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

But Gradle sync fails with an error message:

Error:Build-in class shrinker and resource shrinking are not supported yet.

Is this possible or I need to enable full proguard to use resource shrinking?

like image 911
android_dev Avatar asked Nov 09 '22 14:11

android_dev


1 Answers

Ryan R is completely right. Just small addition. You could either completely remove useProguard false string from your buildTypeclosure, or set it to useProguard true if you are in release build type.

like image 127
Alex_297 Avatar answered Nov 14 '22 21:11

Alex_297