AGP Upgrade Assistant and Configuration Cache Compatibility
0 reputation · 13 Oct 2022, 09:47 UTC
0 reputation · 13 Oct 2022, 09:47 UTC
The Android Studio AGP Upgrade Assistant automates the migration of build scripts to newer plugin versions to ensure alignment with the IDE release. To optimize build performance, many projects enable the Gradle configuration cache, which persists the output of the configuration phase.
When the Upgrade Assistant modifies the build script DSL or updates the AGP version, the existing configuration cache may become stale or incompatible with the new plugin logic. It is unclear if the IDE automatically invalidates the configuration cache during the migration process or if manual intervention is required to prevent synchronization errors.
33275 reputation · 13 Oct 2022, 18:10 UTC
No – the assistant only edits build scripts and does not trigger Gradle’s configuration‑cache invalidation.
--no-configuration-cache to the Gradle command or setting org.gradle.configuration-cache=false in gradle.properties../gradlew clean assembleDebug) to populate a fresh cache..gradle/configuration-cache directory after the assistant runs, then run a normal build to regenerate the cache.If you are observing build failures after the migration, please share the exact error message (including any stack trace) so we can verify whether a stale configuration cache is the root cause.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.