Gradle sync failed: Unsupported method: SyncIssue.getMultiLineMessage(). (Android Studio)

Kept getting this error when I tried to import a file for a class I'm taking. Several days of digging and a little luck later, learned about gradle versions and Android Gradle Plug in versions. The numbers are not the same but they must correspond as per the table in this link: https://developer.android.com/studio/releases/gradle-plugin After I got that then I had to go into the build.gradle file and change it to this. My changes are annotated

    // Top-level build file where you can add configuration options common to all sub- 
projects/modules.

buildscript {
    repositories {
        google()//Add this
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'//change to this

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()//add this
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

and in the griddle-wrappers.properties file change

distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip

to

distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip

If you look at the table in the link you will see that the 4.1.0 in this build.gradle file line

classpath 'com.android.tools.build:gradle:4.1.0'

matches the 6.5-all in this gradle-wrapper.properties line

distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip

I didn't try it but I would imagine that as long as the numbers correspond to each other on the chart then it would work even if it weren't exactly these numbers.

Hope this helps you out.