Jetpack compose can not inspect in AS Layout Inspector. Is there any tools can inspect compose layoutnode.
After Enabling Enable View Attributes in Device's Developer Options solved the issue for me in Android 12 Device
For me, I have to do this to make LayoutInspector works with Compose (Enabling Enable View Attributes in Device's Developer Options doesn't work).
// Before
packagingOptions {
resources.excludes.add("META-INF/*")
}
// After
packagingOptions {
// resources.excludes.add("META-INF/*")
}
It's mentioned in the Google issue tracker. The quote from the user comment:
On my project, i had a similar issue where the layout inspector was not working (the compose views where not shown). I solved it removing this line in my build.gradle :
packagingOptions {
resources.excludes += setOf(
"META-INF/*.version", <= Removing this line
"META-INF/proguard/*",
"META-INF/*.kotlin_module",
"META-INF/DEPENDENCIES",
"META-INF/AL2.0",
"META-INF/LGPL2.1",
"META-INF/*.properties",
"/*.properties"
)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With