Fixed
Status Update
Comments
tn...@google.com <tn...@google.com>
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 5
- Android Gradle Plugin 8.9.0-alpha05
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
To repro:
Build.VERSION.SDK_INT
is above a particular value.@RequiresApi
to capture this requirement.Expected:
Lint warns me if I call this method without checking
Build.VERSION.SDK_INT
(like how the@RequiresApi
annotation works in non-test code).Actual:
Lint tells me to use
@SdkSuppress
instead (see screenshot). This doesn't seem equivalent to me, since@SdkSuppress
should only be used on public@Test
methods to allow the test runner to decide whether to run them or not. This is a private method, which won't be directly invoked by the test runner.