Status Update
Comments
pi...@gmail.com <pi...@gmail.com> #2
Forgot to mention - the line in build.gradle to comment out, line 90, should read: androidBuildTool libs.androidTools.sdkCommon
. That's the one adding a compile-only dependency on sdk-common
- it resolves the warning, so to reproduce the problem it needs to be commented out/removed/etc.
xa...@google.com <xa...@google.com> #3
Chris, did something change in our build to make sdk-common an impl dependencies?
cm...@google.com <cm...@google.com> #4
We annotated some task classes with an annotation that's currently defined in sdk-common, as I think it's planned to be shared with Studio.
cm...@google.com <cm...@google.com> #5
we could add an api dependency from gradle-core to sdk-common or move that enum in to gradle-core for now if we want to fix this
am...@google.com <am...@google.com> #6
Moving the enum class to gradle-core and having a mirrored representation on studio's side seems like the way to go
uc...@google.com <uc...@google.com>
ga...@google.com <ga...@google.com>
an...@google.com <an...@google.com>
an...@google.com <an...@google.com>
pi...@gmail.com <pi...@gmail.com> #7
Hi, thanks for the effort here! I've just updated my project with the newly-released AGP version 7.4.0-alpha10, and removed its explicit dependency on sdk-commons. It seems like the issue still exists - I run compileJava
as described above and still get that "unknown enum constant" warning.
Did the fix make it in to alpha10, or will it come later?
sa...@google.com <sa...@google.com> #8
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 Flamingo Canary 7 (2022.2.1.7)
- Android Gradle Plugin 8.0.0-alpha07
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
DESCRIBE THE ISSUE IN DETAIL:
I maintain a Gradle plugin that, among other things, depends on:
On AGP 7.4.0-alpha08, my project builds without warnings or errors. When I update it to alpha09, I see the following build failure (due to enabling warnings-as-errors):
This enum comes from
sdk-commons
. I don't explicitly depend on this, and interestingly, none of my code seems to reference it, either. Adding a compileOnly dependency onsdk-commons
resolves the error; it appears to me as if AGP transitively depends onsdk-commons
, and between alpha08 and alpha09 something in that transitive chain changed from anapi
dependency to animplementation
dependency.STEPS TO REPRODUCE:
git clone https://github.com/keepsafe/dexcount-gradle-plugin
git checkout agp-7.4.0-alpha09
./gradlew compileJava
ATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply
all required information.
Studio Build: N/A Version of Gradle Plugin: 7.4.0-alpha09 Version of Gradle: 7.5 Version of Java: 11.0.15 (Azul Systems, Inc. 11.0.15+10-LTS) OS: Mac OS X 12.4 aarch64