Fixed
Status Update
Comments
lu...@google.com <lu...@google.com>
je...@google.com <je...@google.com>
sr...@google.com <sr...@google.com>
sr...@google.com <sr...@google.com> #2
Added this line in the error message: If the project was modified externally while this project was open, syncing your project may help locating the currently used AGP version; this window will update once sync finishes
.
an...@google.com <an...@google.com> #3
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 6
- Android Gradle Plugin 8.9.0-alpha06
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
It shows a message that AGP can (in this case) be upgraded from 8.1.2 to 8.1.3, while build.gradle.kts already contains id("com.android.application") version "8.1.3" apply false.
The recommended upgrade assistent fails with the following message:
"Upgrade AGP dependency from 8.1.2 to 8.1.3
Changing the version of the Android Gradle Plugin dependency effectively upgrades the project. Pre-upgrade steps must be run no later than this version change; post-upgrade steps must be run no earlier, but can be run afterwards by continuing to use this assistant after running the upgrade.
This step is blocked
Cannot find AGP version in build files. Cannot locate the version specification for the Android Gradle Plugin dependency, possibly because the project's build files use features not currently supported by the Upgrade Assistant (for example: using constants defined in buildSrc)."
After manually syncing the project with gradle files the upgrade assistent recognizes the project as up to date.
The error message is confusing and doesn't hint to the correct solution of just syncing the project.
Either the error message should be changed or Android Studio should automatically sync the project if discrepancies between project and build files are detected.
Build: AI-223.8836.35.2231.11005911, 202310260319
AI-223.8836.35.2231.11005911, JRE 17.0.6+0-17.0.6b829.9-10027231x64 JetBrains s.r.o., OS Linux(amd64) v5.10.0-26-amd64, screens 3200.0x1800.0
AS: Giraffe | 2022.3.1 Patch 3
Kotlin plugin: 223-1.9.0-release-358-AS8836.35.2231.11005911
Android Gradle Plugin: 8.1.2
Gradle: 8.0
Gradle JDK: JetBrains Runtime version 17.0.6
NDK: from local.properties: (not specified), latest from SDK: (not found)
CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
Source: send_feedback_icon```