I thought it was not possible, but why mistake we were able to upload an apk to GooglePlay without VersionCode neither VersionName. If it's possible, which is the version code the app is going to have?
Related
This is quite strange situation. I have an android app in the market. Current version is 1.5.1 uploaded on 18th June. Google play is also displaying as last production release. This release has version code 25. yesterday I wanted to do another upload with version code 26 but I only saved as draft.
But google play shows me a notification that my release is live in the store
This release had 1.6 as release name but in the store is still 1.5.1. So I wanted to do another release with 1.6. now it tells me that "You need to use a different version code for your APK because you already have one with version code 26". I dont have this release draft also. It doesn't even appear anywhere. it is not also live in the store.
Does anybody have something similar? is it safe to make a new release with code 27 now? because Last release in the market is 25. so I will skip 1 number. will users receive update?
Yes, it's best to go change your version code to 27. Yes, users will receive the update.
If you can't find it, go to the build.gradle and set the version code and name inside the defaultConfig element
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
You can then upload it. Google only checks the gradle file to manage versions. But the users' client devices have no check. They will update it if the option is checked.
I've been facing a serious problem lately with Android Studio, where the versionCode specified in the build.gradle file is not taken into account.
It happened twice now, and the first time it just worked for no reason after countless tries. It's either this or the Google Developer Console has some sort of bug which doesn't correctly detect the versionCode.
I tried editing it manually as well as with the build flavors, I always get an error message from Google when trying to upload the update, specifying the old versionCode.
(I am also changing the versionName)
You have to update both versionCode & versionName to higher values
According to the official documentation (Versioning your applications), the "android:versionCode" must be increased with every release of an Android application.
For release versions supposed to be uploaded to Google Play, I understand why this is necessary. However, what about nightly builds, mainly aimed at developers? For these, the versionCode would need to be generated, which is not straightforward (SCM like Git without numeric commit id, possibly multiple builds from the same commit etc.).
So, my question:
Can I just use a constant versionCode for nightly builds? What consequences will this have (apart from not being able to upload to Google Play)?
Can I just use a constant versionCode for nightly builds?
Sure. That's what happens every time you run your app from your IDE, after all, unless you have scripted something (e.g., in Gradle) yourself to generate a unique versionCode.
What consequences will this have (apart from not being able to upload to Google Play)?
Nothing that's any different from doing builds in the IDE, other than things that are more tied to doing centralized builds, more so than versionCode (e.g., certificate mismatch errors, unless everyone and the CI server are synchronized to use the same debug keystore).
VersionCode is used to upgrade your apps, if you are using the same versionCode in your ease release, it will oveeride your apk file and don't able to install your new release file in which you have made some changes in it
In android you have versionCode and versionName by default. versionCode is an integer that is used by Google Play Store to make sure that you are uploading a new version of the app
For e.g. If you are releasing your fisrt app to playstore, your versionCode is android:versionCode="1" and if you're releasing your second version, your android:versionCode="2", so it will always increasing.
In build.gradle file, there is an attribute called versionCode. Whenever I make an update to the project, should I increase the value of versionCode?
android:versionCode —
An integer value that represents the version of the application code,
relative to other versions.
Typically, you would release the first version of your application
with versionCode set to 1, then monotonically increase the value with
each release, regardless whether the release constitutes a major or
minor release. This means that the android:versionCode value does
not necessarily have a strong resemblance to the application release
version that is visible to the user. Applications and publishing
services should not display this version value to users.
Screenshot of versionCode at Play Store Developer Console:
android:versionName —
A string value that represents the release version of the application
code, as it should be shown to users.
Screenshot of versionName in Already Published app at Play Store:
Summary: Version code is for keeping track of your application update, which is basically used when you upload a new apk in the Play Store. On the other hand versionName is a String that is visible to user so that they can see there's a new version available.
Source: Versioning Your Applications
You should increase the versionCode for any new version you plan to release on Google Play (or whatever other distribution channels you use) as an update to the existing version. For internal testing, you don't have to increment the versionCode since you can force a reinstall.
If u plan on publishing your app to playstore then each update must have different verionCode and versionName is simply for developers to keep track of major changes and updates.
You need to increase the value of version code only when you are publishing the app otherwise there is no need to increase it. You can continue with the same version code
I have android app published in google play with the following version:
android:versionCode="1"
android:versionName="1.0"
I think that's the default version when creating android app in Eclipse IDE. I made minor changes in my app. I want to publish the updated app. What is the recommended versionCode and versionName for the updated app?
What I want is that users who already installed the app will be notified by google play that a new version is available. Im new to android development. In my device, I received notification for my installed app that there are new version available. I want this functionality.
I'm thinking of having:
android:versionCode="2"
android:versionName="1.0.1"
Is that OK?
thanks
Yes thats perfect.
Typically, you would release the first version of your application
with versionCode set to 1, then monotonically increase the value with
each release, regardless whether the release constitutes a major or
minor release. This means that the android:versionCode value does not
necessarily have a strong resemblance to the application release
version that is visible to the user (see android:versionName, below).
Applications and publishing services should not display this version
value to users.
As with android:versionCode, the system does not use this value for
any internal purpose, other than to enable applications to display it
to users. Publishing services may also extract the android:versionName
value for display to users.
Ref : Versioning Your Applications and versionCode vs versionName in Android Manifest
Yes that's correct.
The versionCode needs to increment but the versionName can be any string to be shown to your users.
See docs for fuller explanation: http://developer.android.com/tools/publishing/versioning.html