“无法开始编译:输出路径没有为模块指定...”。 [英] "Cannot start compilation: the output path is not specified for module..."
问题描述
我有一个非常简单的Java + Gradle项目。它建立良好。它可以从gradle run的shell中运行。但是,如果我尝试在IntelliJ内部运行,则得到:
无法启动编译:未指定模块的输出路径xyz在Configure Project中指定输出路径。
我的编译器输出设置为继承项目编译输出路径。我不想要一个自定义的输出路径,不管那是什么,只是做一个普通的gradle构建并运行。
必须转到您的模块设置> Project
并指定一个项目编译器输出,并让你的模块从项目继承。 (对于模块>路径>继承项目
。 这对我有用。 / p>
I have a very simple Java + Gradle project. It builds fine. It runs fine from the shell with "gradle run". However, if I try to run inside of IntelliJ, I get:
Cannot start compilation: the output path is not specified for module "xyz" Specify the output path in Configure Project.
My "Compiler output" is set to "Inherit project compile output path". I don't want a custom output path, whatever that is, just do a normal gradle build and run.
You just have to go to your Module settings > Project
and specify a "Project compiler output" and make your modules inherit from project. (For that go to Modules > Paths > Inherit project
.
This did the trick for me.
这篇关于“无法开始编译:输出路径没有为模块指定...”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!