0

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 !!

CoDe
  • 11,056
  • 14
  • 90
  • 197

1 Answers1

0

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.

CoDe
  • 11,056
  • 14
  • 90
  • 197