I am using the latest version of Android Studio and have installed the latest version of Gradle from Gradle's website. I then imported some Android sample apps but the build generates an error that reads:
Gradle version 1.10 is required. Current version is 2.1.
I have no idea where it is getting the version 1.10 from. If I open the gradle-wrapper.properties file, I have:
distributionUrl=https://services.gradle.org/distributions/gradle-2.1-bin.zip
I have this problem with every sample I open. Why isn't Gradle using the version I installed? The GRADLE_HOME environment variable is set to the path of the latest version of Gradle.
Even if I run gradlew to force a download of the version of Gradle needed, I still get this error. One post here in SO is:
https://stackoverflow.com/a/23466323/753632
meaning that a specific version of Gradle is required for a specific version of the Android Gradle Plugin, but this was posted some time ago and it isn't clear whether this is an issue anymore.