Smitha Smitha - 5 months ago 288x
Android Question

Unable to build an android gradle project - for a cordova project

I am unable to build a gradle project, even if I edit the gradle property, I get the following error:

Error:(22, 1) A problem occurred evaluating root project 'android'.
> Failed to apply plugin [id 'android']
> Gradle version 2.10 is required. Current version is 2.2.1. If using the gradle wrapper, try editing the distributionUrl in C:\Users\salangar\angular-cordova-tickrv0.1\platforms\android\gradle\wrapper\ to

How do I resolve it?


I was also getting the same error and modifying the
$(your app path)/platform/android/gradle/wrapper/ to


didn't help as it was getting overridden every time i ran cordova build android to 2.2.1

I finally changed the gradleBuilder.js file under $(your app path)/platforms/android/cordova/lib/builders folder.

Search for distributionUrl and change it 2.10.

This triggered download of gradle-2.10 and compilation went through. At least it worked for me.