IntelliJ IDEA仅在项目窗口中显示外部库。

huangapple go评论94阅读模式
英文:

IntelliJ IDEA is only showing External Libraries in the project window

问题

我正在使用IntelliJ IDEA 2023.1.2(社区版),如您在附图中所见,项目资源管理器只列出了External Libraries

我尝试过重新构建项目使缓存无效以及从右侧面板的maven菜单重新导入root pom.xml,尝试运行mvn idea:idea,但仍然没有列出项目文件。我该如何解决?

注:我有相当多的运行配置,因此除非有一种直接的方法可以将所有运行配置移动到新项目中(克隆到不同目录),否则删除整个项目并使用新的克隆不是一个选项。

英文:

I am using IntelliJ IDEA 2023.1.2 (Community Edition) and as you can see in the attached image, the project explorer only lists External LibrariesIntelliJ IDEA仅在项目窗口中显示外部库。.

I tried Rebuilding the project, Invalidate Caches and reimporting the root pom.xml from maven menu at right side panel, tried running mvn idea:idea, but still the projects files are not listed. How can I fix this?.

Note: I have quite a lot run configurations hence deleting the entire project and using a new clone is not an option unless there is a straight forward way to move all the run configurations to the new project (cloned to a different directory)

答案1

得分: 2

可能是项目导入时出现了问题。请逐步尝试以下故障排除步骤来解决它。

  • 尝试清除 File | Invalidate Caches... | Invalidate and Restart
  • 关闭项目窗口,位于 File | Close Project,然后关闭 IntelliJ,尝试重新打开它。
  • 在操作系统文件浏览器中打开项目,并删除所有 *.iml 文件以及项目中的 .idea 文件夹。
  • 从现有源重新导入项目到 IntelliJ,选择 pom.xml - https://www.jetbrains.com/help/idea/import-project-or-module-wizard.html
英文:

Probably there was an issue with the project import. Try the following troubleshooting steps one by one to address it.

  • Try to clear File | Invalidate Caches... | Invalidate and Restart
  • Close the project window at File | Close Project and IntelliJ and try to reopen it.
  • Open your project in OS file explorer and remove all *.iml files and the .idea folder from your project.
  • Re-import the project into IntelliJ from Existing sources by selecting pom.xml - https://www.jetbrains.com/help/idea/import-project-or-module-wizard.html

答案2

得分: 0

进入 文件 > 项目结构 > 模块(在项目设置下)。然后点击 "+ 添加内容根" 并选择您的项目目录。它将检测您项目中的 src 文件夹。

我用这种方法解决了我的问题,希望能对您有所帮助!

英文:

Go to File> Project Structure> Modules(under Project Settings). There click "+ Add Content Root" and select your project directory. It will detect src folder which resides in your project.

I have solved mine using this method, hope it helps!

huangapple
  • 本文由 发表于 2023年6月19日 13:42:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76503889.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定