Status Update
Comments
jl...@google.com <jl...@google.com> #2
Thanks for reporting this issue.
Would you be able to provide:
- version of compose used
- version of Android Studio used
- the idea.log (Help | Show log in Finder) after attempting to use the Layout Inspector on a compose app
cj...@gmail.com <cj...@gmail.com> #3
- Compose 1.3.0
- AS Flamingo C6
- attached
jl...@google.com <jl...@google.com> #4
I see errors in the logs but I am not convinced they are contributing to the Layout Inspector problem of not displaying compose nodes.
Would it be possible to try a few more things:
- is it possible to see compose nodes in the Layout Inspector on an emulator running the same app ?
- if you create a new empty compose app, do you see compose nodes in the Layout Inspector on the pixel 7 pro (or the emulator)
[note: there is a known problem with the Layout Inspector when Studio has 2 projects open at the same time (I assume that is not the case here)]
cj...@gmail.com <cj...@gmail.com> #5
- Tried on an emulator and its the same issue, I don't see anything in LI. Its a fully compose app so sort of expected if something is amiss with the compose part.
- It works for a new empty compose app! (on my pixel 7 pro, didn't try on emulator yet)
One thing thats weird in my case is that before the app is connected I see the the options but as soon as LI connects to the running app, options disappear and no layout nodes to inspect.
cj...@gmail.com <cj...@gmail.com> #6 Restricted
jl...@google.com <jl...@google.com> #7
Thank you for posting the project.
I wasn't able to build it because of a missing plugin.
But I think I see the issue:
packagingOptions.resources {
excludes += listOf(
"*.properties",
"META-INF/*.version", <============== The layout inspector needs to know the version of compose:ui:ui
"META-INF/*.kotlin_module",
"META-INF/LGPL2.1",
"META-INF/AL2.0",
)
}
The layout inspector uses the version file of compose:ui:ui to determine the inspector version to use for compose inspection.
Since the version file is excluded it cannot determine which version to load and decides wrongly that this isn't a compose app.
This problem should be fixed in canary 8 where a banner will show what is wrong instead of silently ignore the compose elements.
I suggest removing the version files only in the release version as suggested here:
That should fix the problem you was seeing.
cj...@gmail.com <cj...@gmail.com> #8
Thank you! That was the issue. I was pulling my hair out on this.
jl...@google.com <jl...@google.com> #9
Great, glad to hear that it is resolved.
cj...@gmail.com <cj...@gmail.com> #10
Also, Let me know if its okay to open a new issue for this but the LI doesn't seem to "see" past SaveableStateProvider
ie it doesn't show the hierarchy in the content of the NavHost. Not sure why but I added a screen shot to illustrate.
jl...@google.com <jl...@google.com> #11
Yes, please add a new bug for this.
You can add a reference to the new bug here (for faster turnaround).
I assume this is the same app.
cj...@gmail.com <cj...@gmail.com> #12
Okay I started a new issue
Description
Layout Inspector is not working with my device.
No LI does not show compose nodes (nor the option to turn on recomposition counts)
Physical phone: Pixel 7 Pro
Haven't tried emulator yet
Attached more logs