13

After trying cleaning up the build cache (doing 'rm -rf $HOME/.gradle/caches/' as suggested in How to clear gradle cache?), Gradle stopped working entirely (no task would work). All of them immediate report the following error:

* Where:
Settings file '/.../android/settings.gradle.kts' line: 1

* What went wrong:
Failed to load compiled script from classpath [/.../.gradle/caches/jars-9/.../classes.jar].

Any ideas?

Roberto
  • 541
  • 4
  • 7

1 Answers1

31

I found that the whole $HOME/.gradle folder needed to be deleted, otherwise Gradle would not work, looking for a missing jar. So, the solution:

rm -rf $HOME/.gradle
Roberto
  • 541
  • 4
  • 7