When I try to compile any class in my project I get the error below:
Error scala: Output path .../eval/target/test-classes is shared between: Module \'eval\' tes
all you need to do is:
Enjoy
For gradle, I delete the .idea folder and reopen the project. Everything is recovery.
I had this happen with the root module in a multi-module project. Since the root module was just a placeholder, it didn't actually contain any code, but IDEA still complained that it was sharing an output path ([project]/build
) between test and production.
The fix was to add
plugins {
id "java"
}
at the top of the root build.gradle
file (applying the otherwise unnecessary Java plugin) and reimporting the project. This allowed IDEA to pick up the Java-default [project]/build/classes/main
and [project]/build/classes/test
output directories.
Open up the module settings and look for errors. Fix said errors and everything should work.
I face the same issue i resolve this by deleting .iml2 from the module which was created by intellij.
enter image description here
Idea itself reports an error, the prompt is already very obvious, calm analysis can solve; Open Project Structure --> modules. Delete or reconfigure outputPath,The computer is the most honest