How to build.gradle update

i am not using android studio and i would like to update build.gradle version.
so i have done that change “distributionUrl=” to “distributionUrl=” on

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

build.gradle version keeps change to “distributionUrl=”

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

and also, i have question that am i right to build apk file?

on terminal , i am typing like this.

sumui-Mac-mini:Omnis user$ sudo ionic cordova build android --prod --release – -- --keystore=/Users/…/…/…/*.jks–alias=key0

and insert password that mac user password (not keystore password)

is it right to build apk file on terminal ?


That is not something you should have to do manually.

If you want to update anything, do it the right way: Update your Cordova CLI and cordova-android platform.

What is your ionic info output?

my info is

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

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

global packages:

cordova (Cordova CLI) : 7.1.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

Both outdated, current combination is 8.0.0 / 7.1.0.

1 Like

Thank you for answering my question.
do you know how to upgrade Cordova platforms : android 6.3.0 to 7.1.0 ?
Then please tell me how to update Cordova Platforms : android 6.3.0 to 7.1.0 (not using Android Studio)


You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins:

I just struggled with the same issue, and, like @Sujan12 said, I removed android platform (ionic cordova platform rm android) and installed the 7.1.0 (ionic cordova platform add android@7.1.0)

Cordova Platforms : android 6.3.2

Ahem yes, and who are you and what is your problem?