Fixed
Status Update
Comments
pu...@gmail.com <pu...@gmail.com> #2
Any update on this? This is a major blocker as we cannot run any androidTest under library projects/modules
ze...@google.com <ze...@google.com>
sg...@google.com <sg...@google.com> #3
Hi there, thank you for your patience.
Could you please attach a sample project that shows this issue? Or please explain where and how the resource is defined and referenced.
Could you please attach a sample project that shows this issue? Or please explain where and how the resource is defined and referenced.
tn...@google.com <tn...@google.com>
sg...@google.com <sg...@google.com> #4
Sample project is linked in #1, along with a repro step. Is anything still missing?
tn...@google.com <tn...@google.com> #5
Ah I missed that, thanks for pointing it out. I'll check it out and keep you updated.
sg...@google.com <sg...@google.com> #6
Hi, any update on this issue?
sa...@google.com <sa...@google.com> #7
I understand that this is an old issue and I am just starting to investigate this. Is this still a problem?
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).