Q:

Using an unsupported version of Gradle

When generating the APK I'm getting the error: The project is using an unsupported version of gradle. I'm working with Android Studio 3.5 version.
I've tried to change build gradle classpath to match distributionUrl in gradle-wrapper.properties but the error persists.
First, in Project-level settings, Use default gadle wrapper is selected.
Build.gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'

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

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

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

Gradle-wrapper file:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

The project is using an unsupported version of Gradle.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)

A:

from the look of things you're using a very old version of gradle which might have been depreciated, an upgrade of gradle could solve this issueclasspath 'com.android.tools.build:gradle:3.4.2' and distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

