'getClassLoaderCache error when upgrading Gradle from 6.7 to 7.0.1

I'm fairly new to Gradle. Whenever I try to upgrade an existing project from 6.7 to 7.0.1 a traceback comes up as

java.lang.NoSuchMethodException: org.gradle.api.tasks.testing.Test.getClassLoaderCache()

Is there any workaround or missing dependency that I'm overlooking?



Solution 1:[1]

I had the same problem and could solve it by upgrading one of my plugins. From

 plugins {
     id 'org.gradle.test-retry' version '1.1.3'
 }

to

 plugins {
     id 'org.gradle.test-retry' version '1.3.1'
 }

So perhaps checking your plugins might help. Shame that the Gradle exception doesn't help at all.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TdrFlp