Failed to load script defintions by org.jetbrains.kotlin.idea.core.script.GradleScriptDefintionsContributor
Answered
As the title states.
I have IntelliJ 2020.1.3 and installed Gradle (4.4.1) using apt-get on Ubuntu 20.
However, I am getting:
Failed to load script defintions by org.jetbrains.kotlin.idea.core.script.GradleScriptDefintionsContributor
And in the Sync tab:
ERROR: Unable to load class 'org.slf4j.LoggerFactory'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
But I am not sure if the first problem causes the second.
If I use Gradle 6.6.1 via snap, I am getting:
Could not open cp_init remapped class cache for 5f15eml4ylzxlt2juauohwygo (/home/user/.gradle/caches/6.1.1/scripts-remapped/wrapper_init1_bbd2idj9be9r12k9gjc66z4ys/5f15eml4ylzxlt2juauohwygo/cp_init3607aee355f62839c5e6f549478ccc87).
> Could not open cp_init generic class cache for initialization script '/tmp/wrapper_init1.gradle' (/home/user/.gradle/caches/6.1.1/scripts/5f15eml4ylzxlt2juauohwygo/cp_init/cp_init3607aee355f62839c5e6f549478ccc87).
> Could not initialize class org.codehaus.groovy.classgen.Verifier
For some reasin it wants to install the Android SDK if I re-download dependencies. Does this make sens? I am not working on an Android app.
Here is my question on stackoverflow.
Please sign in to leave a comment.
Are you able to build project from command line by Gradle (./gradlew build command)?
Have you tried 2020.3.1 version from https://www.jetbrains.com/idea/download/
Please try also clearing Gradle cache directory.
If problem remains please provide full output from Gradle build including the error and idea.log (Help | Show Log in ... action) file after IDE restart and reproducing. Thanks.