When i am trying to compile a imported project from github, my gradle build always fails with the following exeption.
Unable to find method \'org.gradle.api.
In the file SampleProject/gradle/wrapper/gradle-wrapper.properties
SampleProject/gradle/wrapper/gradle-wrapper.properties
change
distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip
to
distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip