Status Update
Comments
jb...@google.com <jb...@google.com> #2
It looks like studio is assuming you are using the String
, but you are indeed using the KClass
.
Moving over to studio to let them investigate.
ml...@google.com <ml...@google.com>
gh...@google.com <gh...@google.com>
js...@google.com <js...@google.com>
js...@google.com <js...@google.com> #3
It looks like studio is assuming you are using the restricted API that takes a
String
, but you are indeed using the public API that takes aKClass
.
Thank you for the initial investigation! This helped me narrow the scope of source I need to look at.
Opening BottomBarNavDemo
with AndroidX's Studio setting with K2 mode doesn't show a warning, but I guess that's because NavDestination
is also in the source set. According to the screenshot in navigation-common:2.8.0-beta07@aar...
, hence binary resolution.
Also, IIUC, this is a warning in Studio, i.e., IDE, not in AGP CLI run. My attempt to reproduce the issue indicates that the binary resolution of K2 UAST in CLI works fine.
Coincidentally, I got a bug report from JB's ktor team where I can reproduce a similar issue like this: handling an extension receiver and suspend
(whose compiled return type is always Object
) in IDE.
Alas, it's not easy to reproduce that in Studio/Lint setting. Also, it's not trivial to get the patch for IDE fix, either. That is, it's likely fixed in the next version of Studio (w/ 2024.3) (i.e., not even the current canary one, LadyBug).
js...@google.com <js...@google.com> #4
For the record, this is the upstream fix:
As indicated in that commit, it's in IJ 243, and will be merged to Android Studio early November (AGP 8.9)
js...@google.com <js...@google.com> #5
Thanks(?) to
js...@google.com <js...@google.com>
an...@google.com <an...@google.com> #6
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 Ladybug Feature Drop | 2024.2.2 RC 1
- Android Gradle Plugin 8.8.0-rc01
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!
ju...@gmail.com <ju...@gmail.com> #7
Run update
an...@google.com <an...@google.com> #8
The fixes for this issue are now also 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.
Description
Version used: 2.8.0-beta07
- Sample code for reproduction linked below