Tash
06/29/2021, 12:24 AMTash
06/29/2021, 12:26 AM/Users/...: Error: Unexpected failure during lint analysis of GifsList.kt (this is a bug in lint or one of the libraries it depends on)
Message: 'void kotlinx.metadata.jvm.KotlinClassHeader.<init>(java.lang.Integer, int[], java.lang.String[], java.lang.String[], java.lang.String, java.lang.String, java.lang.Integer)'
The crash seems to involve the detector androidx.compose.runtime.lint.ComposableCoroutineCreationDetector.
You can try disabling it with something like this:
android {
lintOptions {
disable "CoroutineCreationDuringComposition"
}
}
Stack: NoSuchMethodError:KotlinMetadataUtilsKt.toHeader(KotlinMetadataUtils.kt:102)←KotlinMetadataUtilsKt.getKmDeclarationContainer(KotlinMetadataUtils.kt:56)←KotlinMetadataUtilsKt.toKmFunction(KotlinMetadataUtils.kt:39)←ComposableUtilsKt.isComposable(ComposableUtils.kt:128)←ComposableUtilsKt.isComposable(ComposableUtils.kt:150)←ComposableBodyVisitor.isComposable(ComposableUtils.kt:176)←ComposableUtilsKt.isInvokedWithinComposable(ComposableUtils.kt:71)←ComposableCoroutineCreationDetector.visitMethodCall(ComposableCoroutineCreationDetector.kt:47)
You can set environment variable LINT_PRINT_STACKTRACE=true to dump a full stacktrace to stdout. [LintError]
Kotlin: 1.5.10
Compose on other modules: beta09
AGP: 4.2.1
Wondering if I need to update/add some dependency, or if this is a legit issue…Louis Pullen-Freilich [G]
06/29/2021, 12:37 AMLouis Pullen-Freilich [G]
06/29/2021, 12:41 AMTash
06/29/2021, 12:50 AMViewModel
that uses viewModelScope
, a Fragment
that uses lifecycleScope
, and two other regular classes that take in a coroutineScope
and use that to launch coroutines.
Not failing for modules that have Compose dependencies. Not failing for all other modules as well…just a select few.Tash
06/29/2021, 12:52 AMTash
06/29/2021, 6:46 PMCoroutineCreationDuringComposition
checks in those failing modules for the moment. Will create an issue & try to have an isolated repro if possible.