java 无法启动编译器:IntelliJ 中未指定 SDK
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35965827/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot Start Compiler: The SDK is not specified in IntelliJ
提问by Mona Jalal
回答by sisyphus
You need to check also the Project
tab on that page, and each module's SDK under the Modules
tab and its Dependencies
sub-tab. They all allow you to specify what SDK to use at different levels. The Project
tab should be set to the only SDK you have, but it might not have anything set and similarly for the module dependencies - they should be set to 'use Project SDK' but they might not be. That's usually the source of the kind of error you're seeing.
您还需要检查Project
该页面上的选项卡,以及该Modules
选项卡及其Dependencies
子选项卡下的每个模块的 SDK 。它们都允许您指定在不同级别使用什么 SDK。该Project
选项卡应设置为您拥有的唯一 SDK,但它可能没有设置任何内容,对于模块依赖项也类似 - 它们应该设置为“使用项目 SDK”,但也可能不是。这通常是您所看到的那种错误的根源。
回答by P V
Do check if the sdk path is set under platform settings-->SDKs. Some times the sdk is not set there.
请检查是否在平台设置--> SDKs 下设置了 sdk 路径。有时 sdk 没有设置在那里。