How to fix all files excluded from the project because of "Failed to calculate the value of task ':compileJava'" error?
Answered
Following the recommendations of All files are excluded in IntelliJ IDEA plugin template ticket, I have downloaded and specified the Amazon Corretto SDK for the my IntelliJ IDEA plugin:
Unfortunately, nothing has changed - I still have the error
Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
Thus, all project files are still excluded:
What I have to do next?
Please sign in to leave a comment.
Please make sure to select JDK 17 in Settings | Build, Execution, Deployment | Build Tools | Gradle for Gradle JVM.
Yann Cebron
Thank you for the answer.
Unfortunately, zero-effect...
The error has not changed:
According to error message, the language version 11 still presents somewhere in settings...
If you need to investigate please feel free to download repository with my plugin - currently there is no my own code there.
I checked out your repository as-is and was able to import it without any problems and run the plugin in the sandbox.
I would suggest to create a copy of your project directory and remove the hidden `.idea` directory from it and then use _File | New | Project from Existing Sources" pointing at that directory. It looks like something with the IDE configuration files might be messed up, and this would recreate them from scratch.
Yann Cebron
Re recreating of `.idea` directory was fixed the excluding of all files from the project, but the `Failed to calculate the value of task ':compileJava' property 'javaCompiler'.` error still presents. What else I need to check to fix this issue? Maybe `build.gradle.kts`? There is
lines in this file.
I would delete the build directory. I found on a few occasions that cached/previously compiled data would mess up the gradle build until the build directory is deleted. It will be automatically created on the next gradle build action.
Vladimir Schneider
Thank you for the answer.
Unfortunately, the deleting of the build directory has not changed anything.
I still have
error.
please try
Yann Cebron
This is the solution.
Thank you for the support!
Where to try
kotlin {
jvmToolchain(17)
}
?
safdafa In your Gradle build.gradle.kts file.