gpt4 book ai didi

kotlin - kotlin 序列化插件更新到 1.7.10 后 Gradle 失败

转载 作者:行者123 更新时间:2023-12-03 08:04:02 29 4
gpt4 key购买 nike

我的 build.gradle.kts 启动如下:

...
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
...

kotlin("jvm") //target version is java 11
kotlin("plugin.serialization") version "1.6.21"
}

当我尝试将 kotlin 序列化插件更新到更新的 1.7.10 version 时,我收到以下编译错误:

A problem occurred configuring project ':my-little-project'.
> Failed to notify project evaluation listener.
> org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin: org.jetbrains.kotlinx.serialization.gradle.SerializationGradleSubplugin not a subtype
> org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin: org.jetbrains.kotlinx.serialization.gradle.SerializationGradleSubplugin not a subtype

我该如何解决这个问题?谢谢!

堆栈跟踪(太大而无法完整发布,更多信息请询问):

Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':my-little-project'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:68)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:51)
...
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:89)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:346)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:249)
...

最佳答案

感谢@aSemy 列出了问题所在。我们的微服务架构意味着还有另一个总体的 build.gradle.kts 文件,其中包含也需要更新的行:

kotlin("jvm") version "1.6.10" apply false

关于kotlin - kotlin 序列化插件更新到 1.7.10 后 Gradle 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73018912/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com