Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

编辑-解决此问题-通过设置以下问题解决:“设置->构建,执行,部署-Java编译器->项目字节码版本:9”

我正在关注https://www.logicbig.com/tutorials/core-java-tutorial/modules/getting-started-in-intellij.html上的示例/教程

这不是Maven项目。我在项目结构中将源级别设置为9,例如

Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

我将项目级别设置为9:

Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

我收到“错误:(3,4)java:-source 8中不支持模块   (使用-source 9或更高版本启用模块)”,尝试构建/运行项目的主类时发生错误。

是的,我已经看到Intellij IDEA 2018.1 Jdk10 cannot run test尚无答案。

我刚刚将Intellij更新为2019.2.4,但问题仍然存在。我正在使用SDK 11。 如何解决?谢谢。

编辑:“运行/调试”配置选项:

Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

编辑:错误:

Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

编辑:平台SDK:

Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

编辑:依赖性面板:

Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

FWIW,iml文件的内容显示语言级别9:

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_9" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/src" isTestsource="false" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_9" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/src" isTestsource="false" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
    <orderEntry type="module" module-name="common.widgets" />
  </component>
</module>
qq329119652 回答:Intellij错误:(3,4)java:-source 8不支持模块(使用-source 9或更高版本来启用模块)[已解决]

此问题已解决-该问题已通过以下设置解决:“设置->构建,执行,部署-Java编译器->项目字节码版本:9”

感谢所有花时间尝试提供帮助的人。

,

Set SDK

我认为您必须在项目结构

平台设置下设置 SDK

enter image description here

本文链接:https://www.f2er.com/3166498.html

大家都在问