Status Update
Comments
ho...@google.com <ho...@google.com>
xo...@google.com <xo...@google.com> #2
Thanks for the question! There is more information about this message in a tooltip, but that's not very discoverable. (I'll look to see if it's possible to add a hyperlink)
The brief answer to the question is that there are many ways of structuring a project's build files, only some of which are understood by the machinery underlying the AGP Upgrade Assistant. Probably the most common way of setting things up that will lead to this message is to have versions of dependencies and plugins specified using static constants defined in a class in buildSrc
; it's unfortunate, because that is a nice way of centralizing dependency versions (though it does have downsides: any change to anything in buildSrc
causes a full recompile of the project).
There's now a bit more documentation at
xo...@google.com <xo...@google.com> #3
I added a hyperlink pointing to the documentation, so hopefully it's clearer what the cause is and how users can move forward. Thanks again for the report.
de...@google.com <de...@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 Dolphin Canary 2 (2021.3.1.2)
- Android Gradle Plugin 7.3.0-alpha02
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!
or...@gmail.com <or...@gmail.com> #5
It's still unclear. I read
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
// 2/16/22 suggested by
// https://discuss.gradle.org/t/conflicts-with-xerces/25861
// xerces class conflict casting parser ant pulling in orgmob build.xml
configurations.classpath.exclude group: 'xerces', module: 'xercesImpl'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
}
}
// and some other allprojects stuff
The web page just talks about buildSrc
, which I'm not using. I've never gotten this error message before in the multiple years of using Android Studio. What specifically is supposed to be done differently?
xo...@google.com <xo...@google.com> #6
I'm not sure I understand your situation. That project-level build.gradle
file looks reasonable to me: did the Upgrade Assistant upgrade it successfully? When exactly did you get the "Cannot find AGP version in build files" diagnostic? Thanks!
or...@gmail.com <or...@gmail.com> #7
Yesterday what happened to me is that I got the warning to upgrade the dependency on com.android.tools.build:gradle from 7.1.1 to 7.1.2, did so. Then I had build problems and the Upgrade Assistant appeared giving the complaint about not finding the AGP version, so I backed off the change.
Today I made the dependency change just like yesterday and it all worked. My Mac (Monterey 12.2.1) had been put to sleep overnight, but not restarted. Yesterday I had just upgraded to Android Studio Bumblebee 2021.1.1 Patch 2 from Bumblebee Patch 1 just before making the dependency change.
¯\(ツ)/¯
do...@gmail.com <do...@gmail.com> #8
gu...@gmail.com <gu...@gmail.com> #9
Build #AI-211.7628.21.2111.8193401, built on February 17, 2022", and in
ma...@gmail.com <ma...@gmail.com> #10
1. downloaded new android studio.
2. imported project (previous gradle 7. something)
3. after importing project upgraded ( gradle 8.1.1)
4. after that i closed the ide and started again.
and
this message showed up.
after restarting the ide again, it showed sync the project.
after syncing the project, the message was gone.
Description
AI-203.7717.56.2031.7935034, JRE 11.0.10+0-b96-7249189x64 JetBrains s.r.o., OS Linux(amd64) v5.4.0-91-generic, screens 1680.0x1050.0, 1680.0x1050.0
AS: Arctic Fox | 2020.3.1 Patch 4; Kotlin plugin: 203-1.5.20-release-289-AS7717.8; Android Gradle Plugin: 4.2.2; Gradle: 7.0.2; Gradle JDK: version 11.0.10; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)Source: user_sentiment_feedback
IMPORTANT: Please read