Status Update
Comments
pu...@gmail.com <pu...@gmail.com> #2
ze...@google.com <ze...@google.com>
tn...@google.com <tn...@google.com>
sg...@google.com <sg...@google.com> #4
for all who are looking for a solution use this:
tn...@google.com <tn...@google.com> #5
I forgot to mark this bug when this was fixed last week, by this CL:
It's fixed in Giraffe/8.1 but I think we should backport it to Flamingo/8.0 as well.
Søren, it sounds like you want to start desugaring these methods (good idea); maybe there should be a different tracking issue for that.
sg...@google.com <sg...@google.com> #6
Thanks Tor. I have
sa...@google.com <sa...@google.com> #7
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 Giraffe Canary 1 (2022.3.1.1)
- Android Gradle Plugin 8.1.0
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
Using: AS 2022.2.1 Canary 9, com.android.tools:desugar_jdk_libs:2.0.0, AGP 8.0.0-alpha09
Code below does not cause AS to show any warning that it is API 31+ only when
TypedArray#close
is invoked as part of a try-with-resources block:In fact, an IDE intention suggested that I converted my classic use to TypedArray (that is, calling
TypedArray#release
after use) to a try-with-resources block, which I did (since I saw no API warning I assumed it was either desugared or properly handled for all API levels by D8) only to see it crash on API < 31.It would be nice to have this call desugared or AS not suggesting to use try-with-resources on minApiSdk < 31 (which is probably pretty much all apps currently).