Status Update
Comments
al...@google.com <al...@google.com>
[Deleted User] <[Deleted User]> #2
Forgot to add the second screenshot. Here it is
ky...@gmail.com <ky...@gmail.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.
al...@google.com <al...@google.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.
al...@google.com <al...@google.com> #5
Thank you! That will help immensely.
rg...@google.com <rg...@google.com>
da...@gmail.com <da...@gmail.com> #6
ho...@eure.jp <ho...@eure.jp> #7
rg...@google.com <rg...@google.com> #8
Is the project otherwise empty? I will attempt to reproduce from a brand new project with nothing else.
vr...@deezer.com <vr...@deezer.com> #9
Except for a MainActivity
, the project is empty.
br...@monzo.com <br...@monzo.com> #10
Great, thank you, I will investigate this today :)
rg...@google.com <rg...@google.com>
ti...@google.com <ti...@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.
br...@monzo.com <br...@monzo.com> #12
Still no dice :(
en...@gmail.com <en...@gmail.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)?
ti...@google.com <ti...@google.com> #14
Can you reproduce the issue and then grab the idea.log and attach it here? (select Help > Show Log in Explorer)
ti...@google.com <ti...@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?
en...@gmail.com <en...@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!
ti...@google.com <ti...@google.com> #17
Thank you! I will continue to investigate.
ap...@google.com <ap...@google.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.
jb...@google.com <jb...@google.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.
ti...@google.com <ti...@google.com> #20
Good news - I figured it out :)
Fix incoming!
de...@gmail.com <de...@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.
gr...@gmail.com <gr...@gmail.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.
ch...@gmail.com <ch...@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).
ti...@google.com <ti...@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!
jb...@google.com <jb...@google.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!
Description
According to docs
WindowInsetsCompat.CONSUMED
used inViewCompat.setOnApplyWindowInsetsListener
lambda should affect only View's direct children. This is working as expected on API >= 30, but on lower API's it affects whole View hierarchy making all other Views (even indirect children) ignore Insets.This behaviour is reproduced here:https://github.com/ai-corpo/InsetsTest . On API 30
NestedScrollView
respects bottom Inset even if topAppBar
returnedWindowInsetsCompat.CONSUMED
, but on lower API's same code makesNestedScrollView
ignore Insets.