Status Update
Comments
cm...@google.com <cm...@google.com>
an...@google.com <an...@google.com>
an...@google.com <an...@google.com> #2
I don't think the average developer understands the distinction between method references and method definitions in this context (inside a DEX file). I know I don't.
@jvg, can you elaborate?
ja...@google.com <ja...@google.com> #3
people who are looking at the bytecode in the dex to optimize their app through shrinking hopefully will learn the difference as string tables for method references between various dex files can account for quite a bit of disk space. but more importantly a definition is something you can analyze its code for where a reference you can't so the UI can be confusing without seeing the difference
an...@google.com <an...@google.com> #4
How about something like this?
I think having defined members be directly under the class node while references are nested in a group makes more sense.
Also note that the method refs have a
ja...@google.com <ja...@google.com> #5
sounds reasonable to me, thanks
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 Canary 4
- Android Gradle Plugin 8.8.0-alpha04
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!
ja...@google.com <ja...@google.com> #7
Hey @jpaupore, I tried to enable the scope enlarger for K2 IDE: KaResolveExtensionProvider
.
Could you please help us how we can use KaResolveExtensionProvider
for the Android data binding completion?
pa...@gmail.com <pa...@gmail.com> #8
Are there any updates?
an...@google.com <an...@google.com> #9
We've identified the root cause and are working on a fix upstream in the Kotlin plugin.
ja...@google.com <ja...@google.com> #11
We are on discussion to land my commit for the next IntelliJ release, but I confirmed my commit fixes this issue on the upstream K2 IntelliJ with Android plugin:
The video shows the completion for a simple data binding class. I used the codelab example from
ja...@google.com <ja...@google.com> #12
I confirmed ActivityMainBinding
from
@andymagee, Could you please follow up e.g., adding unit tests to studio-main code base and close this issue after the next Android Studio release? I will reassign this issue to you.
an...@google.com <an...@google.com> #13
Agreed, the behavior is now correct as tested in the latest builds of Studio. I'll update our tests and close this issue.
an...@google.com <an...@google.com> #14
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 Canary 2
- Android Gradle Plugin 8.8.0-alpha02
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
Description:
When K2 Mode is enabled in Android Studio, the generated ViewBinding class cannot be imported automatically. The import statement has to be manually written, and the autocomplete feature does not function as expected. This results in an “Unresolved reference ActivityNameBinding” error.
Steps to reproduce:
Expected Result: The ViewBinding class should be automatically imported and the autocomplete feature should work correctly.
Actual Result:
The ViewBinding class is not automatically imported, the autocomplete feature does not work, and an “Unresolved reference ActivityNameBinding” error is displayed.
Please note that this issue occurs only when K2 Mode is enabled. The functionality works as expected in default mode. This issue significantly slows down the development process as developers have to manually write import statements for each ViewBinding class. I hope this issue will be addressed promptly. Thank you.