gpt4 book ai didi

java - IntelliJ IDEA Ultimate 2018.3 认为我的 Java 9 项目是 Kotlin 项目

转载 作者:IT老高 更新时间:2023-10-28 13:32:34 25 4
gpt4 key购买 nike

我有一个 IntelliJ 项目,它由几个子项目组成,这些子项目都是 Java 9 模块。我使用 Maven 作为构建系统。我的项目没有“方面”。我的运行配置如下所示: Run Configuration

我的项目设置如下所示: Project Settings

我可以用 Maven 构建一切。但是,当我尝试用 IntelliJ 编译时,它莫名其妙地认为我的项目是 Kotlin 项目,无法编译:

Error message

Error:Kotlin: The Kotlin standard library is not found in the module graph. Please ensure you have the 'requires kotlin.stdlib' clause in your module definition

有人知道如何解决这个问题吗?我已经尝试删除运行配置并重新创建它。这解决了一段时间的问题,但随后又随机出现。

最佳答案

即使在 2019.1.3 中也存在该错误。

一个对我总是有效的解决方案是:

构建菜单 => 重建项目

使用 JDK 12.0.1 测试


随着越来越多的 Java 项目传递到 JDK 11++,IntelliJ 团队应该尽快解决这个问题

关于java - IntelliJ IDEA Ultimate 2018.3 认为我的 Java 9 项目是 Kotlin 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53497454/

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