The specified initialization script '/tmp/ijresolvers.gradle' does not exist

Viewed 2338

Linux Mint 20.1

In IntelIJ 2020 I import SpringBoot gradle project.

here my build.gradle

plugins {
    id 'org.springframework.boot' version '2.4.2'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

group = 'com.gmail.myproject
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

test {
    useJUnitPlatform()
}

And from terminal I success run spring boot project:

./gradlew bootrun

Nice.

Now I want to run project from IntelIJ. But I get error:

11:23:24 AM: Executing task...


FAILURE: Build failed with an exception.

* What went wrong:
The specified initialization script '/tmp/ijresolvers.gradle' does not exist.

* 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 10ms
11:23:24 AM: Task execution finished.
4 Answers

I had the same issue as you, thankfully as it is a /tmp/ folder issue, all you need to do is restart your system. I just rebooted and the problem was gone.

Deleting the /home/[YOUR_USERNAME]/.gradle worked for me.

Had the same error but access to '/tmp' was not the reason. Idea tried to import project w/o SDK set. Below worked for me

  1. Set SDK (ctrl-alt-shift-s)
  2. !! Unlink gradle project in gradle tab
  3. Reload gradle project again.

I had the same issue with intellij running via flatpak. Downloading intellij from jetbrains and running directly fixed the issue.

Related