0
votes

I'm writing an application and trying to execute task using Terminal command gradle task1 created in app/build.gradle file. But it giving following error.

Gradle version 2.10 is required. Current version is 2.5. If using the gradle wrapper, try editing the distributionUrl in /home/user/workplace/Project/gradle/wrapper/gradle-wrapper.properties to gradle-2.10-all.zip

I checked with gradle-wrapper.properties and there distributionUrl attribute pointing same 2.10 version. distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip

what is wrong here, any suggestion !!

1
Have to tried to rebuild your project and clean again ?GrIsHu

1 Answers

0
votes

Ahh..that is because I was trying to build task using Gradle install on local machine. Instead I tried with project directory

./gradlew task1

and this worked fine.