-
Notifications
You must be signed in to change notification settings - Fork 82
Cordova export: update android-versionCode #1044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm pretty sure versioncode is optional, cordova generates an android version code using the the version number. Only issue with this is that it only understand 3 value version numbers and we use 4 value. It actually ignores the 4th value completely. I did make an adjustment to prevent 4 value version numbers from being valid in the cordova exporter, but it was removed as it broke compatibility with other exporters. |
|
Ah. But could we not generate an android-versionCode ourselves taking in to account the fourth number? |
I guess, apparently 2100000000 is the maximum value for the versioncode. It would dramatically change the versioncode relative to any older builds, I'm not sure if that'll have any consequences. Something like:
|
I think this might be worth a trial to see how it pans out. It would be nice to auto-increment the build number on export if we don't already as well (although it'd need to wrap around after .99, given that version code scheme, unless you shunt everything else up by 10x). Or if not, at least alert the user they need to increment the 3rd number, not the 4th, when exporting again. I'll leave this up to you to decide. |
Got this in to r70. |
A user has reported that they cannot update an existing APK without manually editing config.xml to insert android-versionCode: https://www.scirra.com/forum/cordova-versioncode_t198150
If possible we should automatically update this so manual modifications aren't necessary.
The text was updated successfully, but these errors were encountered: