Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle fails with: Failed to load compiled script from classpath [.../.gradle/caches/jars-9/.../classes.jar]

Tags:

android

gradle

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?

like image 364
Roberto Avatar asked Dec 02 '25 04:12

Roberto


1 Answers

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
like image 126
Roberto Avatar answered Dec 09 '25 06:12

Roberto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!