【发布时间】:2021-07-07 16:48:10
【问题描述】:
我是学习 Kotlin 的新手,我在 Intellij Idea 中使用 EduTools 插件参加 Atomic Kotlin 课程
当我检查任何练习时(除了 hello,world 部分的练习 1-2),我遇到了这个错误:
Failed to launch checking
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileJava'.
java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x4a0535bd) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x4a0535bd
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUİLD FAILED in 1s
Task :util:compileKotlin NO-SOURCE
Task :util:compileJava NO-SOURCE
Task :util:processResources NO-SOURCE
Task :util:classes UP-TO-DATE
Task :compileKotlin UP-TO-DATE
Task :compileJava FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
2 actionable tasks: 1 executed, 1 up-to-date
尽管我的提交和答案相同,但检查失败。
我该如何解决这个问题?
我用:
- IntelliJ IDEA 社区版 2021.1.3
- Gradle v. 7.1.1
- JDK v.16.0.1
【问题讨论】:
标签: kotlin gradle intellij-idea