Ionic change gradle version doesn't work


I got this error when running ‘ionic run android’

What I did is change this line to


as the terminal suggested. But it still has the error, and the file got reverted to distributionUrl=

still. Any thought?


you have to modify ./platforms/android/cordova/lib/builders/GradleBuilder.js
at this line:

var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'http\\://';


build.gradle at this line:

dependencies {
    classpath ''


Which version of cordova platform do you use?

For me ./platforms/android/cordova/lib/ is empty and I am using cordova android 5.2.2 and ionic 2.0.1