Status Update
Comments
hu...@google.com <hu...@google.com> #2
Forgot to add the second screenshot. Here it is
cm...@hotmail.com <cm...@hotmail.com> #3
Hi! I don't seem to be able to reproduce this behavior. As far as the resolution goes, these are treated exactly the same under the hood so I'm not sure how there would be a discrepancy.
I did notice that in your example, you are missing a semicolon after "age" in the PersonView
, and when I left that out, I got the same issue with things not resolving, but once I put the semicolon then everything worked as expected. Just want to verify that that's not the cause.
sj...@gmail.com <sj...@gmail.com> #4
The missing semicolon is a typo from my part and shouldn't change the behaviour in the issue. In my own code, I also have a semicolon. Unfortunately I don't seem to be able to edit the issue description.
Maybe the issue only arises in certain situations? I gave a simplified version of the problem with simple objects, but in my project I have database view on joins. I made sure that the simplified version of the issue also arises syntax errors in my own project though. Maybe something else clashes with it?
At the moment of writing, there are 2 other persons who also seem to have the issue (looking at the "I am impacted" vote count), so it seems that I'm not the only one with the issue, but weird that you can't seem to reproduce with my example.
Let me try to reproduce the issue in a clean project. Give me day or two for that.
ac...@google.com <ac...@google.com>
ac...@google.com <ac...@google.com> #5
Thank you! That will help immensely.
sj...@gmail.com <sj...@gmail.com> #6
ac...@google.com <ac...@google.com> #7
I created a fresh project, and I still got the error. I did find something interesting though, and that is that the issue occurs (for me at least) when I add the @Dao
annotation. Before that, I do not get the error and the columns and view in "SELECT name FROM PersonView"
are actually linking with the field and class respectively.
What I mean with that, is when you click with your mouse wheel (or ctrl + b) on name
, it actually goes to the name
field in PersonView
. And when you click on PersonView
it also actually goes to that class. But after I add @Dao
, I get the error as described above (name
and PersonView
become red and get "Cannot resolve symbol ..."
).
So it seems as if @Dao
is breaking the connection / link to the class? How far did you setup a project to reproduce the issue? Are you using the same versions as described in the issue? In my clean project, I used higher versions:
AGP: 8.7.3
Gradle: 8.9
The rest is the same:
Java: 18
OS: Windows 11
Studio Build: Ladybug | 2024.2.1 Patch 3
So even in higher versions of AGP and Gradle, the issue still persists. I used higher versions in my clean project to eliminate the possibility that the issue might have been fixed in a higher version.
I can share the setup project on GitHub if you'd like to. But don't know whether it will help since the issue seems to relate to the code editor, and not necessarily to the code itself. I didn't really create anything new except a database class, DAO class, an entity class and a view class.
sj...@gmail.com <sj...@gmail.com> #8
Is the project otherwise empty? I will attempt to reproduce from a brand new project with nothing else.
ac...@google.com <ac...@google.com> #9
Except for a MainActivity
, the project is empty.
sj...@gmail.com <sj...@gmail.com> #10
Great, thank you, I will investigate this today :)
ac...@google.com <ac...@google.com> #11
I'm on
AGP: 8.7.3 Gradle: 8.11.1
and I am not able to reproduce.
Switching Gradle to 8.9 now.
ac...@google.com <ac...@google.com> #12
Still no dice :(
cm...@google.com <cm...@google.com> #13
I wonder what the problem is then? Is it some kind of setting inside the editor itself that causes issues?
Do you guys do debug sessions? That way I can show the issues on-the-fly and maybe you can instruct me to debug my Android Studio locally (as far as that's possible)?
cm...@google.com <cm...@google.com> #14
Can you reproduce the issue and then grab the idea.log and attach it here? (select Help > Show Log in Explorer)
ac...@google.com <ac...@google.com> #15
OK. I've gotten a Windows (10) environment set up. I have this exact version of Android Studio with that version of AGP and Gradle. I even installed the custom Lombok plugin you have. I cannot get this to reproduce. I am attaching my project as a .zip so you can open it and tell me if the issue reproduces with it. If not, would you be willing to export your minimal repro project to a .zip and attach it so that I can see if it reproduces locally?
sj...@gmail.com <sj...@gmail.com> #16
Sorry, exactly on the day that you replied, I was abroad for a few weeks, so I didn't have access to my computer. Now I'm back home! (Saying this because I don't want you think I forgot about the issue)
Good news though! The issue does not appear in the project you sent! So that means we at least have 2 projects to compare with each other! At first sight, the immediate difference that I can find is that my project uses only Java, and your project uses mostly Kotlin. But don't know how that could influences this bug.
I had to change two things in your project though, as Gradle didn't immediately build on my end. I changed:
- In
libs.version.toml
(and consequently thedependencies
inbuild.gradle.kts
), I had to add theroom-runtime
library, as theroom-common
library that you used didn't recognizeandroidx.room.RoomDatabase
inPersonDatabase
- In
build.gradle.kts
, I had to changejvmTarget
inkotlinOptions
from11
to17
Attached my own project here as you asked!
ac...@google.com <ac...@google.com> #17
Thank you! I will continue to investigate.
ar...@gmail.com <ar...@gmail.com> #18
So it repros here with your project. Check it out though - if you comment out public abstract PersonDAO personDAO();
in PersonDB.java
, does the issue disappear? It does for me. I will keep looking into it.
vl...@desygner.com <vl...@desygner.com> #19
The issue also disappears for me when commenting out public abstract PersonDAO personDAO();
. If you comment out @Dao
in PersonDAO.java
, the issue also disappears.
am...@google.com <am...@google.com>
sa...@gmail.com <sa...@gmail.com> #20
Good news - I figured it out :)
Fix incoming!
ar...@gmail.com <ar...@gmail.com> #21
Amazing! Super happy to hear that!
Care to explain exactly what was wrong (if you're allowed to)? On a very high-level overview, as I obviously don't know how Android Studio works under the hood. But did it have something to do with the language (as I suggested in one of the above messages)?
I'm especially very curious why it was so hard for you to reproduce it.
sa...@google.com <sa...@google.com> #22
it.views.contains(table.psiClass)
Took a while to isolate it to that line, though :) The fact that it worked in the other cases (no @Dao
, not the return type of a method on the @Database) was a freak coincidence and red herring. :/ PersonDAO
-typed fields, or an Optional<PersonDAO>
didn't have the same effect, it was only the return type of methods that mattered.
rp...@google.com <rp...@google.com>
ar...@gmail.com <ar...@gmail.com> #23
Aha super interesting! Really happy that you found it haha :). This bug has been bothering me for months now lol.
I also found another bug actually, not related to this. Do I need to make a new issue for that or can I give a small description here (it's not a big bug, very similar to another bug I posted earlier).
vs...@google.com <vs...@google.com> #24
New bug pls :)
Yeah, this one was introduced back in 2021 so it's been there a while. Glad you were able to help me fix it!
ar...@gmail.com <ar...@gmail.com> #25
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 Meerkat Feature Drop | 2024.3.2 Canary 4
- Android Gradle Plugin 8.10.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!
sa...@google.com <sa...@google.com>
no...@google.com <no...@google.com> #26
If you are seeing this issue, can you please try:
1. Help > Edit Custom VM Options
2. Add the line -Drundebug.install.use.pm.terminate=false
3. Restart IDE
th...@gmail.com <th...@gmail.com> #27
Hi, that doesn't help. For see changes in code i need:
1 - do changes
2 - run assembleDebug
3- run android-app
And that for simple changes like add Modifier.background(Color.Red), changes in Fragment as Style doesnt apply too
But if i'm try do changes in latest AS Canary Build #AI-243.23654.117.2432.13021186, built on February 6, 2025 i'm get this problem too and notification: "Install successfully finished in 25 ms with no build tasks before launch". How i can help u?
no...@google.com <no...@google.com> #28
There have likely been two seperate causes for this bug; both should be resolved.
Run Cofigurations w/ Missing Build Steps
Click Run/Debug Configurations > Edit Configurations, click the active run configuration and confirm that there is a "Gradle-aware Make" step in the "Before launch" section.
If you update your Studio version, try to run your app, and see a message about "No Build" similar to
App Not Correctly Restarting After Deployment
If your changes are not deploying, and you are forced into any of the following scenarios:
- Changes require pressing run twice to deploy
- Changes do not appear until killing/restarting the app after deployment
- Changes require uninstalling/reinstalling the app
We believe the issue to be related to a bug in how Studio stops/restarts the app after installation on Android API levels >= 33 (Android 13/Tiramisu onwards).
We have rolled out a server config flag that should disable this incorrect behavior. This server flag will be picked up upon restarting Studio; in addition, subsequent releases of Studio will also have this incorrect behavior disabled.
Given the above, I am marking this as closed for now; if you are on this bug and still seeing incorrect deployment behavior that does not fit into either of the above categories, we should open a new high priority bug to track that down.
an...@google.com <an...@google.com> #29
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 Patch 1
- Android Gradle Plugin 8.8.1
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!
an...@google.com <an...@google.com> #30
The fixes for this issue are now also available in:
- Android Studio Meerkat Feature Drop | 2024.3.2 Canary 5
- Android Gradle Plugin 8.10.0-alpha05
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
an...@google.com <an...@google.com> #31
The fixes for this issue are now also available in:
- Android Studio Meerkat | 2024.3.1 RC 2
- Android Gradle Plugin 8.9.0-rc02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
fi...@gmail.com <fi...@gmail.com> #32
Android 16 beta 3
an...@google.com <an...@google.com> #33
Further fixes for this issue are now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Patch 2
- Android Gradle Plugin 8.8.2
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description