Reputation: 761
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?
Upvotes: 18
Views: 8256
Reputation: 761
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
Upvotes: 48