How to change Android App version built with Ionic framework


I am writing the technique to change the version of Android App which is very straight forward and easy. There are basically two easy ways to do so.

1. Manually changing version of Android App

Here we will find build.grade file and change version of android app as mentioned below.

versionCode 4
versionName "4.0"

Note: make sure you make changes only to build.grade (Module:, do not touch other build.grade files.

2. Via command change version of Android App

This technique is helpful and easy to change hybrid mobile App version for both Android and IOS by simply running one command.

Here, we need to install a plugin capacitor-set-version, click here

If you need to update the version in only one platform, you can use the commands “set:ios” or “set:android”, accordingly.

Examples setting version for Android & IOS:

# Set android version only
capacitor-set-version set:android -v 1.1.1 -b 100 ./my-app

# Set ios version only
capacitor-set-version set:ios -v 1.1.1 -b 100 ./my-app

Few more examples

# Set version to 1.2.3 and build number to 10 on current folder.
capacitor-set-version -v 1.2.3 -b 10

# Set version of project on folder ./my-app
capacitor-set-version -v 1.2.3 -b 10 ./my-app

# Set android only version and build number
capacitor-set-version set:android -v 1.2.3-rc1 -b 1546 ./my-app

# Set iOS version only
capacitor-set-version set:ios -v 1.2.3 -b 10 ./my-app

Comments are closed.