androidandroid-studioandroid-jetpack-composelayout-inspector

Layout inspector not showing compose nodes


Trying to inspect my pure Compose app in the layout inspector shows the screen without any layout node information. No errors in the logs. This happens on both real devices and emulators. I have tried Android Studio Bumblebee (latest patch) and Chipmunk (Beta). Compose version is 1.1.1

Layout inspector


Solution

  • When only the views are shown, but no Composables, make sure to not exclude .version files from META-INF, since the compose UI tooling utilizes them, e.g. remove/adjust these:

    packagingOptions {
        resources {
            excludes += "META-INF/*.version"
        }
    }
    

    or

    packagingOptions {
        resources {
            excludes += "META-INF/**"
        }
    }