Android Question problem with version number in APK

bazp

Member
Licensed User
Longtime User
I submitted an APK to Google play as version 1 and it was accepted. I made a change to the program and changed to version to 2 and resubmitted. now it gives the following message.

"You need to use a different version code for your APK because you already have one with version code 1."

any help would be appreciated.
 

bazp

Member
Licensed User
Longtime User
I changed it in the source program and then realized I needed to change it in the read-only manifest.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I changed it in the source program and then realized I needed to change it in the read-only manifest.

No, i think you dond need to do that this way...

B4X:
#Region  Project Attributes
    #ApplicationLabel: VDFB
    #VersionCode: 1
    #VersionName: v0.1alpha
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: True
#End Region

Thats - #VersionCode: 1 - is the one Google talking about... Normally you only need to changed this number to a higher one (integer, not float or string) and then google should accept the new "version".

#VersionName instead can be used to set a userfriendly Versioninformation like "v0.1alpha"
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Is there any way to do incremental versions on Google Play so that people get the update automatically? i.e. Version 1.0, 1.1, 1.2, 1.3 etc???

I know I can use VersionName, but will Google Play recognize this as an incremental upgrade and auto update all users?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
#VersionCode: 1
#VersionName: 1.0

Google uses the VersionCode. VersionName you can choose whatever you want to show THAT to the user.

App which are installed from google play will get their update from google and each release must have a new VersionCode
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
So, the only versions you can upload to Google Play are Integer Version numbers? How do all of these people out there do incremental updates???

BTW, thanks Manfred... you're always quick to jump in and help... much appreciated.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
#VersionCode: 123

Upload new release to google.
In your app you can get this number. Save it in a variable of type double. Divide this number with 100. What you get is a Version 1.23. Nicely formatted with numberformat.

According to this you can use the versionname directly with 1.23 (then you dont need to dive with 100...

Ready :D

The fact is Google DOES USE the VersionCode (Int). For ALL Apps. You have to deal with it.
 
  • Like
Reactions: eps
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Perfect Manfred... Great explanation. I love it though! MS Office 2007... version 20.07 lol!

Thanks again!!!
 
Upvote 0
Top