Android向我抛出“发现重复类”,但我什么也没做
如何处理此错误?在Internet上找不到任何内容
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations$ReflectSdkVersion found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations$ReflectSdkVersion found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
Duplicate class kotlin.io.path.DirectoryEntriesReader found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.ExperimentalPathApi found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.FileVisitorBuilder found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.FileVisitorBuilderImpl found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.FileVisitorImpl found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.LinkFollowing found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathNode found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathRelativizer found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathTreeWalk found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathTreeWalk$bfsIterator$1 found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathTreeWalk$dfsIterator$1 found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathTreeWalkKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathWalkOption found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathsKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathsKt__PathReadWriteKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.io.path.PathsKt__PathUtilsKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.jdk7.AutoCloseableKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21)
Duplicate class kotlin.jvm.jdk8.JvmRepeatableKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
Duplicate class kotlin.jvm.optionals.OptionalsKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21)
等等...
2条答案
按热度按时间esyap4oy1#
我不是Maven,但在我将Kotlin版本从1.7.0更改为1.8.0后,同样的问题也发生在我身上。请检查您的应用级
build.gradle
文件,以确保您使用的是所需的版本(在您的情况下,我相信它应该是1.8.0):eulz3vhy2#
就加上
实施(平台(“org.jetbrains.Kotlin:kotlin-bom:1.8.0”))
在依赖项中
它解决了我的问题。