Status Update
Comments
je...@google.com <je...@google.com>
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #2
So, the rationale here is that 7.3.0-dev has not been tested for Tiramisu, so AGP assumes there is a newer version that is, and warns against using that SDK/AGP combination. Should we just suppress the message with all preview versions? Or should we have a different message? What if 3 years from now someone tries to use 7.3.0 with a preview version that might not work with it?
AGP could display a simpler message for preview SDKs. Something like this:
You are using a preview SDK compileSdkPreview = "Tiramisu" which has not been tested with this version of AGP.
This Android Gradle plugin (7.3.0-dev) was tested up to compileSdk = 32
je...@google.com <je...@google.com>
de...@google.com <de...@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 Dolphin Canary 9 (2021.3.1.9)
- Android Gradle Plugin 7.3.0-alpha09
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!
hu...@google.com <hu...@google.com> #4
Following up from
What happened after
Let me re-enable this check and update the warning message instead.
tn...@google.com <tn...@google.com> #5
Yes, agreed that this warning is useful. By the way I noticed it's picking up the value from
build-system/builder/src/main/java/com/android/builder/core/ToolsRevisionUtils.java:
MAX_RECOMMENDED_COMPILE_SDK_VERSION = new AndroidVersion(33)
I wonder if we shouldn't migrate that constant (well, at least the 33 part) over to SdkVersionInfo instead in sdklib, where we keep all the other constants around this. That's because we also want to treat this better in general. For example, for Android 14, we think you need to use Giraffe; Electric Eel doesn't have work properly with some changes that are in 14, and Flamingo landed to late for us to really respond. So we want to bake in the notion of "maximum supported version of Android" that the tools have been built/tested for, and encourage people to get a more recent version -- which may in fact only be available as a preview (as is the case for Android 14 + Giraffe at the moment). And we want to put this checks in a few places -- ideally it doesn't just prevent build/sync from working, but you also get notified (with a warning, not an error!) if you try to even download Android 14 SDK in the SDK manager, if you try to point to an already installed higher version using the PSD, etc etc.
+xav, +easonj since I think we're still trying to figure out exactly how this will work -- but it's important for us to get started on it.
hu...@google.com <hu...@google.com> #6
Thanks Tor, I'm now using the constant in SdkVersionInfo
in Change-Id I843f74aa443f18898b6d318f2e7021cd4bc8bc45.
With that change, a build/sync with compileSdkPreview = "UpsideDownCake"
will show the following warning (not an error):
WARNING: We recommend using a newer Android Gradle plugin to use compileSdkPreview = "UpsideDownCake"
This Android Gradle plugin (8.1.0-dev) was tested up to compileSdk = 33.
You are strongly encouraged to update your project to use a newer
(stable or preview) Android Gradle plugin that has been tested with compileSdkPreview = "UpsideDownCake".
If you are already using the latest preview version of the Android Gradle plugin,
you may need to wait until a newer version with support for compileSdkPreview = "UpsideDownCake" is available.
To suppress this warning, add
android.suppressUnsupportedCompileSdk=UpsideDownCake
to this project's gradle.properties.
If you think the message could be better, please comment directly on the change above.
Regarding your other ideas, perhaps we could track it with
hu...@google.com <hu...@google.com> #7
We've now re-enabled the check for SDK preview versions and updated the warning as shown in
This change (
We can track further improvements in this area at
hu...@google.com <hu...@google.com> #9
Thanks for sharing, just to clarify, the information described in the article is already provided in the warning message (
Description
I built a fresh version of AGP and pointed my project to it -- a project which uses the Tiramisu preview.
I get a build warning like this:
We should probably special case previews like this?