Fixed
Status Update
Comments
sg...@google.com <sg...@google.com>
hu...@google.com <hu...@google.com> #2
This might be a regression introduced by
an...@google.com <an...@google.com> #4
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 Canary 3
- Android Gradle Plugin 8.9.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
When upgrading the Android Gradle Plugin from version 8.6 to version 8.7, there was a noticeable APK size increase. Upon further investigation, I realised that this was caused by the fact that our custom build type that was being initialised with the
release
build type's configuration no longer had resource shrinking enabled, so unused resources were kept in the APK. This is due to a change in behaviour in AGP.build.gradle.kts snippet:
By adding
isShrinkResources = true
to theofficial
build type, the APK size would get back to the expected value.If this is intended behaviour, it should be documented somewhere. Otherwise, the behaviour should be reverted to the one in prior versions.