Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

app:checkDebugDuplicateClasses

Como que resolve esse erro?

Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations$ReflectSdkVersion found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations$ReflectSdkVersion found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.io.path.ExperimentalPathApi found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.io.path.PathRelativizer found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.io.path.PathsKt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.io.path.PathsKt__PathReadWriteKt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.io.path.PathsKt__PathUtilsKt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.jdk7.AutoCloseableKt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk7-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0) Duplicate class kotlin.jvm.jdk8.JvmRepeatableKt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.jvm.optionals.OptionalsKt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.streams.jdk8.StreamsKt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0) Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.7.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0)

`

1 resposta
solução!

Olá Jean, tudo bem?

Esse erro ocorre quando há classes duplicadas em diferentes módulos do Kotlin. Para resolvê-lo, você pode tentar adicionar a seguinte configuração ao seu arquivo build.gradle:

exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'

Isso deve excluir o módulo kotlin-stdlib-jdk8, que é onde as classes duplicadas estão presentes.

Caso isso não funcione, você pode tentar atualizar as versões do Kotlin e verificar se o erro persiste.

Espero ter ajudado e bons estudos!