Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Gradle multi-module project breaks on reload, requires cleaning Java Language Server workspace every time

未關閉
#4,317 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
50/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
java, vscode

研究方向

首先,在 VS Code 中使用 Gradle for Java 擴充功能和 Java Language Server,透過一個 Java 多模組 Gradle 專案重現此故障。比較初始載入與執行 "Java: Clean Java Language Server Workspace" 後重新載入或重新開啟的情況;當專案無需再次清理工作區即可保持一致時,即視為完成。

由索引模型根據 Issue 內容生成。

描述

Description
I am working with a Java Gradle multi-module project in VS Code.
On the first load, the project fails with an error like:

The project was not built due to "xxx does not exist". Fix the problem, then try refreshing this project and building it since it may be inconsistent.

The suggested workaround is:

  • Disable Gradle for Java extension
  • Run "Java: Clean Java Language Server Workspace"
  • Reload the project

This workaround does fix the problem, but only temporarily.


Problem
Every time I:

  • reload the window, or
  • close and reopen the project

I have to run "Java: Clean Java Language Server Workspace" again, otherwise the same error appears.

This makes working with the project very inconvenient.


Expected behavior
Once the project is cleaned and loaded successfully:

  • It should stay in a consistent state
  • Reloading or reopening the project should not require cleaning the Java Language Server workspace again

Actual behavior

  • Project breaks again after reload
  • Same error repeats
  • Manual workspace cleaning is required every time

Environment

  • VS Code
  • Java multi-module Gradle project
  • Java Language Server
  • Gradle for Java extension enabled

Additional notes
This looks like a workspace cache or Gradle project import inconsistency issue.
It seems the Java Language Server does not correctly persist the resolved multi-module Gradle state across reloads.

主要語言
TypeScript
星號
2.3k
分支
547
平均合併
20 小時 9 分鐘
30 天內合併 PR
10

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

redhat-developer/vscode-java 的其他 Issue

查看 redhat-developer/vscode-java 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。