Output path is shared between the same module error

后端 未结 13 2105
天涯浪人
天涯浪人 2021-02-01 13:16

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         


        
相关标签:
13条回答
  • 2021-02-01 13:30

    all you need to do is:

    • synchronize both modules (right click > Synchronize)
    • re-import pom.xml for both modules (right click > Maven > Re Import)

    Enjoy

    0 讨论(0)
  • 2021-02-01 13:30

    For gradle, I delete the .idea folder and reopen the project. Everything is recovery.

    0 讨论(0)
  • 2021-02-01 13:32

    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.

    0 讨论(0)
  • 2021-02-01 13:33

    Open up the module settings and look for errors. Fix said errors and everything should work.

    0 讨论(0)
  • 2021-02-01 13:36

    I face the same issue i resolve this by deleting .iml2 from the module which was created by intellij.

    0 讨论(0)
  • 2021-02-01 13:38

    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

    0 讨论(0)
提交回复
热议问题