问题
I am working with Intellij Idea (CE)
- 2020.2.3
And using Gradle 6.7
I have the following situation:
- IntelliJ IDEA (2020.2): Gradle: The cache entry for initialization script (appears to be corrupted)
Part of the solution is disable the Android
plugin (I don't work with Android - so is fine for me).
But until now each time I start the IDE - it automatically builds the spring-framework
project based on Gradle - therefore it starts the daemon and tries to build. But I receive the following error message:
FAILURE: Build failed with an exception.
* What went wrong:
The cache entry for initialization script 'C:\Users\mjord\AppData\Local\Temp\ijinit.gradle' appears to be corrupted.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 149ms
I can confirm the ijinit.gradle
file exists
but - why should be corrupted?
The Gradle configuration is as follows:
From above:
Notes
- Is used a custom gradle home
- Is used a custom user gradle home (repository)
Apart:
- In the PC/Laptop the
.gradle
directory located within the username directory is empty
I did a research in SO about this, but the most similar situation that appears is about the dependency cache
corruption scenario, such as:
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.
Where the solutions suggested are about to configure the gradle-wrapper.properties
file, but it does not exist in the original project and something about network issues (it does not apply in this case)
How fix this situation?
来源:https://stackoverflow.com/questions/64861388/intellij-idea-2020-2-gradle-the-cache-entry-for-initialization-script-ijini