Gradle,错误:找不到模块:kotlin.logging

问题描述

这些是我在build.gradle.kts中的依赖项:

    implementation("io.github.microutils:kotlin-logging:1.7.8")
    implementation("org.slf4j:slf4j-api:1.7.29")

然后在module-info.java中输入

requires kotlin.logging;

其余所有方法都可以通过Java模块化方法很好地工作

但是无论何时我尝试build,我都会得到:

> Task :compileJava Failed
6 actionable tasks: 6 executed
C:\Users\elect\IdeaProjects\assimp\src\main\java\module-info.java:13: error: module not found: kotlin.logging
    requires kotlin.logging;

我在做什么错了?

自动模块名称

PS C:\Users\elect> jar --file=C:\Users\elect\.gradle\caches\modules-2\files-2.1\io.github.microutils\kotlin-logging-jvm\2.0.3\acd404001442be5d98fbaa7ff9df83041cba70fe\kotlin-logging-jvm-2.0.3.jar --describe-module
No module descriptor found. Derived automatic module.

[email protected] automatic
requires java.base mandated
contains mu
contains mu.internal

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)