Jetpack Compose: The layout inspector is not showing the menu for recomposition counts
Asked Answered
A

3

23

Android Studio Bumblebee Patch 3

From this page, it says that I can see recomposition counts: https://developer.android.com/jetpack/compose/tooling#recomposition-counts

It does not show the menu option to me. Only the device name and "Stop inspector"

Aiglet answered 30/5, 2022 at 18:49 Comment(4)
Have you tried the current stable version (Chipmunk)?Dacia
Same thing. I think I am missing something to enable that menu.Aiglet
Do you have the right ui-tooling and ui-tooling-preview dependencies mentioned at the top of developer.android.com/jetpack/compose/tooling?Dacia
Yes, compose version 1.1.1Aiglet
B
21

You just need to enable this option in View Options

enter image description here

Billiebilling answered 12/12, 2022 at 1:39 Comment(0)
F
14

This is only available in Electric Eel at the moment:

"For even more cutting edge features, you can take a sneak peek at the Android Studio Electric Eel release in the Canary channel [...] These features will be promoted to more stable channels once we have your feedback and make improvements, so please try them out." Source

Farinose answered 2/6, 2022 at 16:13 Comment(6)
They mention EE for Live Edit in the Tooling page, but they don't for Layout Inspector. I will wait for a stable release, I am just beginning my project. Thanks and enjoy your 50 points :-)Aiglet
Ok, thanks :-), I'm using the recomposition counts on EE and it works nicely. I have actually sorted out an infinite recomposition loop that I was not aware of... I recommend it!Farinose
@CodePoet may i know which version of EE you are using? i still can't make it appearUird
@Uird I am currently on Electric Eel | 2022.1.1 Canary 5Farinose
@CodePoet i successfully make it show up when i open google's sample, but when it comes to my working project that contains more than 30 sub-modules, it doesn't work. not sure what happens 🥲Uird
@Uird Sorry, I don't know. Maybe it's a bug. But I would suggest you open your own question in case someone can help.Farinose
F
5

I got the same issue, and found the official site has noted that, after upgrade compose version and use Android Studio Preview version, it works for me:

To get started, make sure your app is using Compose 1.2.0-alpha03 or higher. Then deploy your app as you normally would.

Fathometer answered 15/7, 2022 at 12:16 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.