Maven project won't compile after upgrade to Intellij 13.1 from 12

后端 未结 6 1509
有刺的猬
有刺的猬 2020-12-16 17:53

My code no longer compiles after the upgrade. Imports from libraries that are included as maven dependencies show compile issue with Cannot resolve symbol. I have Invalida

相关标签:
6条回答
  • 2020-12-16 18:29

    Change the 'JDK for importer' found under File--> Settings --> Build, Execution and Deployment --> Build Tools --> Maven --> Importing to 'Use JAVA_HOME'

    0 讨论(0)
  • 2020-12-16 18:49

    For me, increasing Maven's allocated memory worked:

    Settings -> Maven -> Runner > VM Options : -Xms128m -Xmx512m

    0 讨论(0)
  • 2020-12-16 18:53

    Invalidate your Idea cache and restart Idea.

    0 讨论(0)
  • 2020-12-16 18:55

    Disable the Maven 3 checkbox in "Settings | Maven | Importing".

    0 讨论(0)
  • 2020-12-16 18:55

    In my case Cannot reconnect error was caused by absence of class DependencyTreeResolutionListener as idea.log states. I've noticed that library containing this class is absent in maven3 plugin but present in maven2. So I copied maven-dependency-tree-1.2.jar from <IdeaInstallDir>/plugins/maven/lib/maven2 to <IdeaInstallDir>/plugins/maven/lib/maven3. Then I updated current maven project by pushing Reimport All Maven Projects button in Maven Projects tool window. After that error was gone.

    0 讨论(0)
  • 2020-12-16 18:56

    This worked for me:

    Settings (Ctrl + Alt + S) > Maven > Importing > JDK for importer: Use JAVA_HOME

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