Reputation: 41
So today I decided to try my hand at making at making a dynamic feature module. I have R8 enabled with both minifyEnabled and shrinkResources set to true. Trying to compile gives me the following error.
Resource shrinker cannot be used for multi-apk applications
Affected Modules: app
Has anyone else seen this? There are similar questions around stack but nothing directly related to DFMs.
I would love to keep this flag enabled to avoid library bloat
Gradle Plugin: 4.0.0
Gradle Wrapper: 6.1.1
Upvotes: 2
Views: 4476
Reputation: 96
This feature is implemented starting Android Gradle Plugin 4.2.0 and can be enabled by setting android.experimental.enableNewResourceShrinker=true
flag in gradle properties.
Details are available here.
Upvotes: 5