What should I do with this? I'm getting a bit desp...
# intellij
t
What should I do with this? I'm getting a bit desperate, IDEA takes away years from my life. Worth to mention that the Gradle scripts are OK (see second screenshot).
1
same 2
😔 1
x
I faced a similar issue quite a while ago. In my case it was the settings file that I have versioned and import on each major version update. Could this be your case too?
thank you color 1
a
I get this error often too https://youtrack.jetbrains.com/issue/KTIJ-25236 The suggested workaround sometimes works, but not always. 1. create file `buildSrc/build.gradle.kts`:
Copy code
// workaround for `AssertionError: Can't find built-in class kotlin.Cloneable`
// <https://youtrack.jetbrains.com/issue/KTIJ-25236>
plugins {
  kotlin("jvm") version embeddedKotlinVersion
}
2. create file
buildSrc/settings.gradle.kts
Copy code
rootProject.name = "buildSrc"

pluginManagement {
  repositories {
    mavenCentral()
    gradlePluginPortal()
  }
}

@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
  repositories {
    mavenCentral()
    gradlePluginPortal()
  }
}
thank you color 1
1
m
I've had this for more as long as I can remember. I thought it was going to be fixed with this AS studio issue but it's definitely not the case. KTIJ-25236 upvoted 👍 , thanks for finding this thank you color
Almost sure that changing the JDK in the Gradle settings works for me too, I'll try next time this happens
e
Gradle support works for a release and breaks for two. Infinite cycle since I can remember (from 2017.3)
j
Pressing
Repair IDE
button on
File
menu -> Removing the
.idea
folder -> Changing the IntelliJ JDK among different vendors/versions -> crying while opening an issue on YouTrack That is my tour when I got red code in Kotlin Gradle scripts on IDEA and it is working on CLI
Between each step, randomly you can try to close/reopen the IDE too