shrinkresources

shrinkResources set to true, but all unused resources (specifically drawables) not getting removed

僤鯓⒐⒋嵵緔 提交于 2019-12-18 04:38:11
问题 I'm setting shrinkResources to true as follows: releasepro { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationIdSuffix ".pro" } But this is removing only a few unused resources. I am aware that gradle does some guessing and leaves resources that is is not sure are unused. Is there a way to remove all unused resources 100% ? I read about setting the shrinkMode to strict in another thread. Will that help? I

protect resources when using shrinkResources

て烟熏妆下的殇ゞ 提交于 2019-12-12 15:32:35
问题 I am trying out the new feature from the build-plugin - unfortunately it removes my sounds from res/raw even though they are referenced in the code. Is there a way to protect resources from being removed? EDIT - after playing around a bit - it seems that this feature is not yet mature and ready to use - another Project it removes needed layout xml from the support lib: D/PassAndroid( 7137): Writing unhandled exception to: /data/data/org.ligi.passandroid/files/2.4.2-1414944524128.tracedroid D

shrinkResources set to true, but all unused resources (specifically drawables) not getting removed

喜夏-厌秋 提交于 2019-11-29 06:12:16
I'm setting shrinkResources to true as follows: releasepro { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationIdSuffix ".pro" } But this is removing only a few unused resources. I am aware that gradle does some guessing and leaves resources that is is not sure are unused. Is there a way to remove all unused resources 100% ? I read about setting the shrinkMode to strict in another thread. Will that help? I could not try it as I could not figure where to set it. Looked for examples and documents but