Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij is erroring when reading my build.gradle.kts file

The red notification bar at the top says: /org/gradle/tooling/BuildException (java.lang.NoClassDefFoundError: /org/gradle/tooling/BuildException. I can run a gradle refresh successfully, I can run the project successfully, but I cannot get that error to go away. I think my project is actually running fine, intellij just can't properly interpret the build.gradle.kts file for whatever reason. Does anybody know what to do? I included an image. Clicking on the red bar does nothing. I can find no more information about the error message anywhere. I'm running the latest intellij EDU.

enter image description here

like image 429
Sam Avatar asked Jan 17 '26 21:01

Sam


1 Answers

Deleting the entire .idea as suggested Luxus would work, but would also be a little bit too extreme.

The problem comes from a misconfigured .idea/workspace.xml, try to find your the part which look like this in the workspace.xml file :

  <component name="StandaloneScriptsStorage">
    <option name="files">
      <set>
        <option value="$PROJECT_DIR$/your_module/build.gradle.kts" />
      </set>
    </option>
  </component>

You'll have to delete the whole <component/> tag, and maybe restart your idea to get rid of the issue.

like image 125
SebVay Avatar answered Jan 19 '26 18:01

SebVay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!