IntelliJ IDEA (2020.2): Gradle: The cache entry for initialization script 'ijinit.gradle' appears to be corrupted

淺唱寂寞╮ 提交于 2021-01-29 08:30:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!