I have the following in my config.xml
<widget android-versionCode="301" version="3.0.1"
After building the app using
ionic cordova build android --release
And I check the version code using
aapt dump badging myappPath.apk
I see that the version code is 3018 (8 is suffixed).
After searching the web I got this answer here
So I tried running the following command.
ionic build --release android -- --versionCode=3
Still getting the same result of 8 being suffixed.