In the mobile-config.js I have specified following
App.info({
.....
version: '1.0.8',
....
});
App.setPreference('android-versionCode', '9');
Accordingly when I build apk it should have versionCode set to 9 and version name to "1.0.8', but in my case versionCode is being set to "10008" while version name is correctly shown as "1.0.8".
Is there something wrong in my config? Is there different method to version Code?
As of Meteor 1.4.2 you can specify buildNumber in App.info within the mobile-config.js file. See example below
App.info({ id: '', name: '', description: '', version: '0.5.6', buildNumber: '5060', author: '', email: '', website: '' });
You can override meteor build files and setting by creating a top level folder called /cordova-build-override/
, read more here errr, GitHub is down, I will post a link when it is back
.
Solution is to pass Android build settings to build-extras.gradle
. You can read more here Android Shell Tool Guide.
Create /cordova-build-override/platforms/android/build-extras.gradle
.
The Android Version Name will be set in mobile-config.js
but the Version Number (Integer) will be set by this gradle file.
cdvVersionCode = '10'
android {
lintOptions {
disable 'MissingTranslation'
disable 'ExtraTranslation'
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With