Layout Inspector doesn't work with Jetpack Compose

419 Views Asked by At

Layout Inspector doesn't work with Jetpack Compose and the hint is

Compose inspection unavailable. Could not determine the version of the androidx.compose.ui:ui artifact. Was the version file excluded?

Layout Inspection

I have no idea how to fix it

1

There are 1 best solutions below

0
ahmetknk On BEST ANSWER

You probably have excluded the version file as the warning says. Version file is contained under META-INF folder. It should be something like META-INF/*.version. If you have something like below try removing it.

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

Refer to this link for more details.