distributionUrl keeps changing 4.1-all.zip to 3.3-all.zip

i am not using android studio and i would like to update build.gradle version.
so i have done that change “distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip” to “distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip” on gradle-wrapper.properties.

however, when i build ionic cordova build android --prod --release – – --keystore=/Users/…/…/…/*.jks–alias=key0

build.gradle version keeps change to “distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip”
before siging keystore.

i don’t know why it keeps changing.
i would like to know how to update build.gradle version.

this is my ionic info.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 6.3.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2


Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
ios-sim           : 6.0.0
Node              : v8.5.0
npm               : 5.3.0
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b

Also i try to update Cordova platform update android to 7.1.0
but ionic info shows that

Installed platforms:
ios 4.5.4
Available platforms:
android 7.1.0

how can i update Cordova platform android too ?


Did you like my answer to your other, very similar topic?

Thank you for answering my question.
But it doesn’t work for me.
After update Cordova platform android, ionic info shows like this.

Installed platforms:
ios 4.5.4
Available platforms:
android 7.1.0

Then you made a mistake somehow.

What does ionic info return now?
You have to remove the Android platform with ionic cordova remove android and add the new one explicitly with ionic cordova add android@7.1.0.