Status Update
Comments
sh...@google.com <sh...@google.com> #2
1. Android Studio version and OS type and version
2. Screenshots or videos of the issue
3. idea.log file (select Help > Show Log in Finder / Explorer)
4. Thread dumps if the issue is a freezing or non-responding UI.
For more information on what’s needed and how to obtain this information please read the guide at
ma...@gmail.com <ma...@gmail.com> #3
Hello,
- and 2. are already included in the initial description.
- is attached to this comment.
- It's not a freezing or non-responding UI
This issue is especially annoying during demos because it makes a really bad showcase for Android developer tools.
I've put the project I'm working on here:
js...@google.com <js...@google.com>
je...@google.com <je...@google.com> #4
so if I understood correctly, the java base module classes are not found, but then when you fix the JDK in the project settings, it works ? If that's the case, it's WAI. I would like still to understand how your project ends up in a state where your JDK settings is incorrect.
ma...@gmail.com <ma...@gmail.com> #5
so if I understood correctly, the java base module classes are not found, but then when you fix the JDK in the project settings, it works
I don't think the JDK settings were ever broken. I have multiple JDKs installed. In this current instance Zulu 17 & 19. Opening the project with 19 I had the red underlines then switching to 17 made them disappear but I think it should work with both? Interestingly, setting the JDK to 19 again the red underlines do not appear again which leads me to believe both JDKs should work the same.
I would like still to understand how your project ends up in a state where your JDK settings is incorrect.
No idea what triggers the behaviour. I just tried and same result with Canary 9 (commit 6d172afc38dc1ec26f07ac4804b7b409f43d1f91
on the repro project). Something I forgot to mention is that it's happening mainly in build.gradle.kts
files. Looks like just restarting the IDE triggers the behaviour.
I've attached a longer recording of the issue, HTH
je...@google.com <je...@google.com>
vm...@google.com <vm...@google.com> #6
First of all, thank you for the reported issue and the details shared. This issue is strictly linked to the fact of using KTS
with a single-module
root project application. Definitely, this shouldn't suppose an issue, but due the platform introduced a new concept on 231
that considers KTS as entities conflicting with the symbols resolution of Android single-module
projects.
Meantime, if necessary, I suggest changing your single-module project
by moving existing Android logic under app
module when working with KTS
until we address this issue. Thank you
ma...@gmail.com <ma...@gmail.com> #7
TIL, thanks! It's a bit unexpected but the workaround works well. Feel free to close this issue or leave it open for anyone else bumping into this.
vm...@google.com <vm...@google.com> #8
Thank you for sharing this. I'm going to mark this as fixed since AS H Canary 12
will include a fix to be able to resolve properly KTS
file symbols on single-module
android projects. Please feel free to test the indicated version and let us know. Thank you
Description
Similar to https://issuetracker.google.com/issues/236692992 but with latest AGP and AS.
Changing the Gradle JDK in AS settings and syncing again solves the issue.
Not 100% sure how to reproduce but I thought I'd put it on your radar.