Does compose generate (lots of!) light and dark gr...
# compose-android
m
Does compose generate (lots of!) light and dark grey listed SDK violations? I have dozens (hundreds!) of these showing up in my logcat complaining about accesses that I can't find anywhere in my own code, eg
Accessing hidden method Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl; (light greylist, reflection)
A full file search in AS doesn't find ViewRootImpl anywhere!
r
Afaik Compose only does this in unit tests. What other libraries do you use?
m
Ah, thanks. Because of that I thought I'd found the problem, I had the android version of material3 not the compose one, but fixing that doesn't improve things. The only one that looks possible to me is Voyager (navigation). You can see from the full list below there's nothing else very odd (is there?) All versions are the latest. I've removed a few that show as not used.
Copy code
[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
kermit = { group = "co.touchlab", name = "kermit", version.ref = "kermit" }
multiplatform-settings-no-arg = { group = "com.russhwolf", name = "multiplatform-settings-no-arg", version.ref = "multiplatformSettingsNoArg" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
ktor-client-okhttp = { group = "io.ktor", name ="ktor-client-okhttp", version.ref = "ktorClientCore" }
ktor-client-android = { group = "io.ktor", name = "ktor-client-android", version.ref = "ktorClientAndroid" }
ktor-client-auth = { group = "io.ktor", name = "ktor-client-auth", version.ref = "ktorClientAuth" }
ktor-client-content-negotiation = { group = "io.ktor", name = "ktor-client-content-negotiation", version.ref = "ktorClientCore" }
ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktorClientCore" }
ktor-client-logging = { group = "io.ktor", name = "ktor-client-logging", version.ref = "ktorClientCore" }
ktor-serialization-kotlinx-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json", version.ref = "ktorClientCore" }
voyager-navigator = { group = "cafe.adriel.voyager", name = "voyager-navigator", version.ref = "voyagerNavigator" }
billing-ktx = { module = "com.android.billingclient:billing-ktx", version.ref = "billingKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
compose-constraint = { group = "androidx.constraintlayout", name = "constraintlayout-compose", version.ref = "constraint" }
kotest-framework = { group = "io.kotest", name = "kotest-framework-engine", version.ref = "kotest"}
kotest-datatest = { group = "io.kotest", name = "kotest-framework-datatest", version.ref = "kotest"}
kotest-property = { group = "io.kotest", name = "kotest-property", version.ref = "kotest"}
androidx-ui-tooling-preview-android = { group = "androidx.compose.ui", name = "ui-tooling-preview-android", version.ref = "uiToolingPreviewAndroid" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin"}
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlinSerialisation = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotest-multiplatform = { id = "io.kotest.multiplatform", version.ref = "kotest" }